@@ -15,7 +15,7 @@ defmodule GroupherServer.CMS do
15
15
ArticleCommunity ,
16
16
ArticleEmotion ,
17
17
CitedArtiment ,
18
- CommentCurd ,
18
+ CommentCURD ,
19
19
ArticleCollect ,
20
20
ArticleUpvote ,
21
21
CommentAction ,
@@ -86,9 +86,16 @@ defmodule GroupherServer.CMS do
86
86
defdelegate read_article ( thread , id ) , to: ArticleCURD
87
87
defdelegate read_article ( thread , id , user ) , to: ArticleCURD
88
88
89
- defdelegate paged_articles ( queryable , filter ) , to: ArticleCURD
90
- defdelegate paged_articles ( queryable , filter , user ) , to: ArticleCURD
91
- defdelegate paged_published_articles ( queryable , filter , user ) , to: ArticleCURD
89
+ defdelegate set_article_illegal ( thread , id , attrs ) , to: ArticleCURD
90
+ defdelegate set_article_illegal ( article , attrs ) , to: ArticleCURD
91
+ defdelegate unset_article_illegal ( thread , id , attrs ) , to: ArticleCURD
92
+ defdelegate unset_article_illegal ( article , attrs ) , to: ArticleCURD
93
+ defdelegate set_article_audit_failed ( article , state ) , to: ArticleCURD
94
+
95
+ defdelegate paged_articles ( thread , filter ) , to: ArticleCURD
96
+ defdelegate paged_articles ( thread , filter , user ) , to: ArticleCURD
97
+ defdelegate paged_published_articles ( thread , filter , user ) , to: ArticleCURD
98
+ defdelegate paged_audit_failed_articles ( thread , filter ) , to: ArticleCURD
92
99
93
100
defdelegate create_article ( community , thread , attrs , user ) , to: ArticleCURD
94
101
defdelegate update_article ( article , attrs ) , to: ArticleCURD
@@ -153,33 +160,39 @@ defmodule GroupherServer.CMS do
153
160
154
161
# Comment CURD
155
162
156
- defdelegate comments_state ( thread , article_id ) , to: CommentCurd
157
- defdelegate comments_state ( thread , article_id , user ) , to: CommentCurd
158
- defdelegate one_comment ( id ) , to: CommentCurd
159
- defdelegate one_comment ( id , user ) , to: CommentCurd
163
+ defdelegate set_comment_illegal ( comment_id , attrs ) , to: CommentCURD
164
+ defdelegate unset_comment_illegal ( comment_id , attrs ) , to: CommentCURD
165
+ defdelegate paged_audit_failed_comments ( filter ) , to: CommentCURD
166
+
167
+ defdelegate set_comment_audit_failed ( comment , state ) , to: CommentCURD
168
+
169
+ defdelegate comments_state ( thread , article_id ) , to: CommentCURD
170
+ defdelegate comments_state ( thread , article_id , user ) , to: CommentCURD
171
+ defdelegate one_comment ( id ) , to: CommentCURD
172
+ defdelegate one_comment ( id , user ) , to: CommentCURD
160
173
161
- defdelegate update_user_in_comments_participants ( user ) , to: CommentCurd
162
- defdelegate paged_comments ( thread , article_id , filters , mode ) , to: CommentCurd
163
- defdelegate paged_comments ( thread , article_id , filters , mode , user ) , to: CommentCurd
174
+ defdelegate update_user_in_comments_participants ( user ) , to: CommentCURD
175
+ defdelegate paged_comments ( thread , article_id , filters , mode ) , to: CommentCURD
176
+ defdelegate paged_comments ( thread , article_id , filters , mode , user ) , to: CommentCURD
164
177
165
- defdelegate paged_published_comments ( user , thread , filters ) , to: CommentCurd
166
- defdelegate paged_published_comments ( user , filters ) , to: CommentCurd
178
+ defdelegate paged_published_comments ( user , thread , filters ) , to: CommentCURD
179
+ defdelegate paged_published_comments ( user , filters ) , to: CommentCURD
167
180
168
- defdelegate paged_folded_comments ( thread , article_id , filters ) , to: CommentCurd
169
- defdelegate paged_folded_comments ( thread , article_id , filters , user ) , to: CommentCurd
181
+ defdelegate paged_folded_comments ( thread , article_id , filters ) , to: CommentCURD
182
+ defdelegate paged_folded_comments ( thread , article_id , filters , user ) , to: CommentCURD
170
183
171
- defdelegate paged_comment_replies ( comment_id , filters ) , to: CommentCurd
172
- defdelegate paged_comment_replies ( comment_id , filters , user ) , to: CommentCurd
184
+ defdelegate paged_comment_replies ( comment_id , filters ) , to: CommentCURD
185
+ defdelegate paged_comment_replies ( comment_id , filters , user ) , to: CommentCURD
173
186
174
- defdelegate paged_comments_participants ( thread , content_id , filters ) , to: CommentCurd
187
+ defdelegate paged_comments_participants ( thread , content_id , filters ) , to: CommentCURD
175
188
176
- defdelegate create_comment ( thread , article_id , args , user ) , to: CommentCurd
177
- defdelegate update_comment ( comment , content ) , to: CommentCurd
178
- defdelegate delete_comment ( comment ) , to: CommentCurd
179
- defdelegate mark_comment_solution ( comment , user ) , to: CommentCurd
180
- defdelegate undo_mark_comment_solution ( comment , user ) , to: CommentCurd
189
+ defdelegate create_comment ( thread , article_id , args , user ) , to: CommentCURD
190
+ defdelegate update_comment ( comment , content ) , to: CommentCURD
191
+ defdelegate delete_comment ( comment ) , to: CommentCURD
192
+ defdelegate mark_comment_solution ( comment , user ) , to: CommentCURD
193
+ defdelegate undo_mark_comment_solution ( comment , user ) , to: CommentCURD
181
194
182
- defdelegate archive_comments ( ) , to: CommentCurd
195
+ defdelegate archive_comments ( ) , to: CommentCURD
183
196
184
197
defdelegate upvote_comment ( comment_id , user ) , to: CommentAction
185
198
defdelegate undo_upvote_comment ( comment_id , user ) , to: CommentAction
0 commit comments