Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit1df4ba4

Browse files
committed
chore(radar): use article_react_mutations
1 parent744a481 commit1df4ba4

File tree

7 files changed

+47
-53
lines changed

7 files changed

+47
-53
lines changed

‎lib/groupher_server_web/schema/Helper/mutations.ex‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
5151
upvote_[thread]
5252
unto_emotion_[thread]
5353
"""
54-
defmacroarticle_upvote_mutation(thread)do
54+
defmacroparticle_upvote_mutation(thread)do
5555
quotedo
5656
@descunquote("upvote to#{thread}")
5757
fieldunquote(:"upvote_#{thread}"),:articledo
@@ -81,7 +81,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
8181
pin_[thread]
8282
unto_pin_[thread]
8383
"""
84-
defmacroarticle_pin_mutation(thread)do
84+
defmacroparticle_pin_mutation(thread)do
8585
quotedo
8686
@descunquote("pin to#{thread}")
8787
fieldunquote(:"pin_#{thread}"),unquote(thread)do
@@ -117,7 +117,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
117117
mark_delete_[thread]
118118
unto_mark_delete_[thread]
119119
"""
120-
defmacroarticle_mark_delete_mutation(thread)do
120+
defmacroparticle_mark_delete_mutation(thread)do
121121
quotedo
122122
@descunquote("mark delete a#{thread} type article, aka soft-delete")
123123
fieldunquote(:"mark_delete_#{thread}"),unquote(thread)do
@@ -152,7 +152,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
152152
mark_delete_[thread]
153153
"""
154154
# TODO: if post belongs to multi communities, unset instead delete
155-
defmacroarticle_delete_mutation(thread)do
155+
defmacroparticle_delete_mutation(thread)do
156156
quotedo
157157
@descunquote("delete a#{thread}, not delete")
158158
fieldunquote(:"delete_#{thread}"),unquote(thread)do
@@ -175,7 +175,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
175175
emotion_to_[thread]
176176
unto_emotion_to_[thread]
177177
"""
178-
defmacroarticle_emotion_mutation(thread)do
178+
defmacroparticle_emotion_mutation(thread)do
179179
quotedo
180180
@descunquote("emotion to#{thread}")
181181
fieldunquote(:"emotion_to_#{thread}"),unquote(thread)do
@@ -207,7 +207,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
207207
report_[thread]
208208
undo_report_[thread]
209209
"""
210-
defmacroarticle_report_mutation(thread)do
210+
defmacroparticle_report_mutation(thread)do
211211
quotedo
212212
@descunquote("report a#{thread}")
213213
fieldunquote(:"report_#{thread}"),unquote(thread)do
@@ -239,7 +239,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
239239
sink_[thread]
240240
undo_sink_[thread]
241241
"""
242-
defmacroarticle_sink_mutation(thread)do
242+
defmacroparticle_sink_mutation(thread)do
243243
quotedo
244244
@descunquote("sink a#{thread}")
245245
fieldunquote(:"sink_#{thread}"),:articledo
@@ -275,7 +275,7 @@ defmodule GroupherServerWeb.Schema.Helper.Mutations do
275275
lock_[thread]_comment
276276
undo_lock_[thread]_comment
277277
"""
278-
defmacroarticle_lock_comment_mutation(thread)do
278+
defmacroparticle_lock_comment_mutation(thread)do
279279
quotedo
280280
@descunquote("lock comment of a#{thread}")
281281
fieldunquote(:"lock_#{thread}_comment"),:articledo

‎lib/groupher_server_web/schema/cms/mutations/blog.ex‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Blog do
4343
resolve(&R.CMS.update_article/3)
4444
end
4545

46-
#############
47-
article_upvote_mutation(:blog)
48-
article_pin_mutation(:blog)
49-
article_mark_delete_mutation(:blog)
50-
article_delete_mutation(:blog)
51-
article_emotion_mutation(:blog)
52-
article_report_mutation(:blog)
53-
article_sink_mutation(:blog)
54-
article_lock_comment_mutation(:blog)
55-
#############
46+
article_react_mutations(:blog,[
47+
:upvote,
48+
:pin,
49+
:mark_delete,
50+
:delete,
51+
:emotion,
52+
:report,
53+
:sink,
54+
:lock_comment
55+
])
5656
end
5757
end

‎lib/groupher_server_web/schema/cms/mutations/job.ex‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Job do
5353
resolve(&R.CMS.update_article/3)
5454
end
5555

56-
#############
57-
article_upvote_mutation(:job)
58-
article_pin_mutation(:job)
59-
article_mark_delete_mutation(:job)
60-
article_delete_mutation(:job)
61-
article_emotion_mutation(:job)
62-
article_report_mutation(:job)
63-
article_sink_mutation(:job)
64-
article_lock_comment_mutation(:job)
65-
#############
56+
article_react_mutations(:job,[
57+
:upvote,
58+
:pin,
59+
:mark_delete,
60+
:delete,
61+
:emotion,
62+
:report,
63+
:sink,
64+
:lock_comment
65+
])
6666
end
6767
end

‎lib/groupher_server_web/schema/cms/mutations/post.ex‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Post do
4343
resolve(&R.CMS.update_article/3)
4444
end
4545

46-
#############
47-
article_upvote_mutation(:post)
48-
article_pin_mutation(:post)
49-
article_mark_delete_mutation(:post)
50-
article_delete_mutation(:post)
51-
article_emotion_mutation(:post)
52-
article_report_mutation(:post)
53-
article_sink_mutation(:post)
54-
article_lock_comment_mutation(:post)
55-
#############
46+
article_react_mutations(:post,[
47+
:upvote,
48+
:pin,
49+
:mark_delete,
50+
:delete,
51+
:emotion,
52+
:report,
53+
:sink,
54+
:lock_comment
55+
])
5656
end
5757
end

‎lib/groupher_server_web/schema/cms/mutations/radar.ex‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Radar do
3838
resolve(&R.CMS.update_article/3)
3939
end
4040

41-
#############
4241
article_react_mutations(:radar,[
4342
:upvote,
4443
:pin,
@@ -49,7 +48,5 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Radar do
4948
:sink,
5049
:lock_comment
5150
])
52-
53-
#############
5451
end
5552
end

‎lib/groupher_server_web/schema/cms/mutations/repo.ex‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Repo do
7070
resolve(&R.CMS.update_article/3)
7171
end
7272

73-
#############
74-
article_pin_mutation(:repo)
75-
article_mark_delete_mutation(:repo)
76-
article_delete_mutation(:repo)
77-
article_emotion_mutation(:repo)
78-
article_report_mutation(:repo)
79-
article_sink_mutation(:repo)
80-
article_lock_comment_mutation(:repo)
81-
#############
73+
article_react_mutations(:repo,[
74+
:pin,
75+
:mark_delete,
76+
:delete,
77+
:emotion,
78+
:report,
79+
:sink,
80+
:lock_comment
81+
])
8282
end
8383
end

‎lib/groupher_server_web/schema/cms/mutations/works.ex‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Works do
3838
resolve(&R.CMS.update_article/3)
3939
end
4040

41-
#############
4241
article_react_mutations(:works,[
4342
:upvote,
4443
:pin,
@@ -49,7 +48,5 @@ defmodule GroupherServerWeb.Schema.CMS.Mutations.Works do
4948
:sink,
5049
:lock_comment
5150
])
52-
53-
#############
5451
end
5552
end

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp