This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ defmodule GroupherServer.CMS.Delegate.CommentCURD do
66 import Helper.Utils , only: [ done: 1 ]
77 import Helper.ErrorCode
88
9- import GroupherServer.CMS.Helper.MatcherOld
109 import ShortMaps
1110
1211 alias GroupherServer . { Accounts , CMS , Delivery , Repo }
1312
1413 alias Accounts.Model.User
15- alias CMS.Model.PostCommentReply
14+ alias CMS.Model . { PostComment , PostCommentReply }
1615
1716 alias Helper . { ORM , QueryBuilder }
1817 alias Ecto.Multi
1918
19+ defp match_action ( :post , :comment ) ,
20+ do: { :ok , % { target: Post , reactor: PostComment , preload: :author } }
21+
2022 @ doc """
2123 Creates a comment for psot, job ...
2224 """
Original file line number Diff line number Diff line change @@ -30,12 +30,6 @@ defmodule GroupherServer.CMS.Helper.MatcherOld do
3030 def match_action ( :post , :community ) ,
3131 do: { :ok , % { target: Post , reactor: Community } }
3232
33- def match_action ( :post , :comment ) ,
34- do: { :ok , % { target: Post , reactor: PostComment , preload: :author } }
35-
36- def match_action ( :post_comment , :like ) ,
37- do: { :ok , % { target: PostComment , reactor: PostCommentLike } }
38-
3933 #########################################
4034 ## jobs ...
4135 #########################################
You can’t perform that action at this time.
0 commit comments