Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 24dd58b

Browse files
authored
refactor(article-comments): comments reply gq workflow && re-org (#341)
* refactor(article-comment): wip * refactor(article-comment): wip * refactor(article-comment): wip * chore(comments): tests for job * refactor(article-comment): wip * refactor(article-comment): wip * chore(comments): tests re-org
1 parent 50692b4 commit 24dd58b

File tree

21 files changed

+2347
-491
lines changed

21 files changed

+2347
-491
lines changed

lib/groupher_server/cms/cms.ex

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ defmodule GroupherServer.CMS do
1313
ArticleOperation,
1414
ArticleReaction,
1515
ArticleComment,
16+
ArticleCommentAction,
1617
ArticleCommentEmotion,
1718
CommentCURD,
1819
CommunitySync,
@@ -129,20 +130,24 @@ defmodule GroupherServer.CMS do
129130
defdelegate update_article_comment(comment, content), to: ArticleComment
130131
defdelegate delete_article_comment(comment), to: ArticleComment
131132

132-
defdelegate upvote_article_comment(comment_id, user), to: ArticleComment
133-
defdelegate undo_upvote_article_comment(comment_id, user), to: ArticleComment
134-
defdelegate reply_article_comment(comment_id, args, user), to: ArticleComment
133+
defdelegate upvote_article_comment(comment_id, user), to: ArticleCommentAction
134+
defdelegate undo_upvote_article_comment(comment_id, user), to: ArticleCommentAction
135+
defdelegate reply_article_comment(comment_id, args, user), to: ArticleCommentAction
135136

136-
defdelegate pin_article_comment(comment_id), to: ArticleComment
137-
defdelegate undo_pin_article_comment(comment_id), to: ArticleComment
137+
defdelegate pin_article_comment(comment_id), to: ArticleCommentAction
138+
defdelegate undo_pin_article_comment(comment_id), to: ArticleCommentAction
139+
140+
defdelegate fold_article_comment(comment_id, user), to: ArticleCommentAction
141+
defdelegate unfold_article_comment(comment_id, user), to: ArticleCommentAction
142+
defdelegate report_article_comment(comment_id, user), to: ArticleCommentAction
143+
defdelegate unreport_article_comment(comment_id, user), to: ArticleCommentAction
138144

139145
defdelegate emotion_to_comment(comment_id, args, user), to: ArticleCommentEmotion
140146
defdelegate undo_emotion_to_comment(comment_id, args, user), to: ArticleCommentEmotion
141-
defdelegate fold_article_comment(comment_id, user), to: ArticleComment
142-
defdelegate unfold_article_comment(comment_id, user), to: ArticleComment
143-
defdelegate report_article_comment(comment_id, user), to: ArticleComment
144-
defdelegate unreport_article_comment(comment_id, user), to: ArticleComment
145-
147+
###################
148+
###################
149+
###################
150+
###################
146151
defdelegate create_comment(thread, content_id, args, user), to: CommentCURD
147152
defdelegate update_comment(thread, id, args, user), to: CommentCURD
148153
defdelegate delete_comment(thread, content_id), to: CommentCURD

0 commit comments

Comments
 (0)