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

Commit e1a5018

Browse files
committed
feat(blog-thread): clean up wip
1 parent 6c698c7 commit e1a5018

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/groupher_server/cms/delegates/article_comment.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
33
CURD and operations for article comments
44
"""
55
import Ecto.Query, warn: false
6-
import Helper.Utils, only: [done: 1, ensure: 2, get_config: 2]
6+
import Helper.Utils, only: [done: 1, ensure: 2]
77
import Helper.ErrorCode
88

99
import GroupherServer.CMS.Delegate.Helper, only: [mark_viewer_emotion_states: 3]
@@ -19,8 +19,6 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
1919
alias CMS.Model.{ArticleComment, ArticlePinnedComment, Embeds}
2020
alias Ecto.Multi
2121

22-
@article_threads get_config(:article, :threads)
23-
2422
@max_participator_count ArticleComment.max_participator_count()
2523
@default_emotions Embeds.ArticleCommentEmotion.default_emotions()
2624
@delete_hint ArticleComment.delete_hint()
@@ -383,7 +381,7 @@ defmodule GroupherServer.CMS.Delegate.ArticleComment do
383381
Map.merge(paged_comments, %{entries: entries})
384382
end
385383

386-
defp set_question_flag_ifneed(%{is_question: true} = article, %ArticleComment{} = comment) do
384+
defp set_question_flag_ifneed(%{is_question: true} = _article, %ArticleComment{} = comment) do
387385
ORM.update(comment, %{is_for_question: true})
388386
end
389387

lib/groupher_server/cms/models/community.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ defmodule GroupherServer.CMS.Model.Community do
44

55
use Ecto.Schema
66
import Ecto.Changeset
7-
import GroupherServer.CMS.Helper.Macros
87

98
alias GroupherServer.{Accounts, CMS}
10-
119
alias Accounts.Model.User
1210

1311
alias CMS.Model.{

0 commit comments

Comments
 (0)