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

Commit d736803

Browse files
committed
chore(article-comments): wip && clean up
1 parent 7d65a6a commit d736803

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

lib/groupher_server/cms/delegates/article_comment.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
6868
do_paged_comment_replies(comment_id, filters, user)
6969
end
7070

71-
@spec paged_article_comments_participators(T.comment_thread(), Integer.t(), T.paged_filter()) ::
71+
@spec paged_article_comments_participators(T.article_thread(), Integer.t(), T.paged_filter()) ::
7272
{:ok, T.paged_users()}
7373
def paged_article_comments_participators(thread, article_id, filters) do
7474
%{page: page, size: size} = filters

lib/groupher_server/cms/delegates/article_comment_action.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleCommentAction do
260260

261261
defp get_article(%ArticleComment{repo_id: repo_id} = comment) when not is_nil(repo_id) do
262262
with {:ok, article} <- ORM.find(CMS.Repo, comment.repo_id, preload: [author: :user]) do
263-
{:job, article}
263+
{:repo, article}
264264
end
265265
end
266266

lib/helper/types.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ defmodule Helper.Types do
3434
}
3535

3636
@type article_thread :: :post | :job | :repo
37-
@type comment_thread :: :post | :job
3837

3938
@type paged_filter :: %{
4039
page: Integer.t(),

test/groupher_server_web/query/cms/comments/repo_comment_test.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ defmodule GroupherServer.Test.Query.Comments.RepoComment do
154154
to_string(replyed_comment_2.id)
155155
end
156156

157-
@tag :wip
157+
@tag :wip2
158158
test "timeline-mode paged comments", ~m(guest_conn repo user user2)a do
159159
total_count = 3
160160
page_size = 20
@@ -363,7 +363,6 @@ defmodule GroupherServer.Test.Query.Comments.RepoComment do
363363
assert List.last(results["entries"]) |> Map.get("id") == to_string(comment.id)
364364
end
365365

366-
@tag :wip2
367366
test "guest user can get paged comment with upvotes_count", ~m(guest_conn repo user user2)a do
368367
total_count = 10
369368
page_size = 10

0 commit comments

Comments
 (0)