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

Commit 68411d7

Browse files
committed
feat(blog-thread): remove matcher old wip
1 parent a247e2b commit 68411d7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

lib/groupher_server/cms/delegates/comment_curd.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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
"""

lib/groupher_server/cms/helper/matcher_old.ex

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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
#########################################

0 commit comments

Comments
 (0)