@@ -99,16 +99,16 @@ defmodule GroupherServerWeb.Resolvers.CMS do
9999 # #######################
100100 # content flag ..
101101 # #######################
102- def pin_content ( _root , ~m( id community_id topic ) a , _info ) do
103- CMS . pin_content ( % CMS.Post { id: id } , % Community { id: community_id } , topic )
102+ def pin_content ( _root , ~m( id community_id) a , _info ) do
103+ CMS . pin_content ( % CMS.Post { id: id } , % Community { id: community_id } )
104104 end
105105
106106 def pin_content ( _root , ~m( id community_id thread) a , _info ) do
107107 do_pin_content ( id , community_id , thread )
108108 end
109109
110- def undo_pin_content ( _root , ~m( id community_id topic ) a , _info ) do
111- CMS . undo_pin_content ( % CMS.Post { id: id } , % Community { id: community_id } , topic )
110+ def undo_pin_content ( _root , ~m( id community_id) a , _info ) do
111+ CMS . undo_pin_content ( % CMS.Post { id: id } , % Community { id: community_id } )
112112 end
113113
114114 def undo_pin_content ( _root , ~m( id community_id thread) a , _info ) do
@@ -251,10 +251,6 @@ defmodule GroupherServerWeb.Resolvers.CMS do
251251 CMS . set_tag ( thread , % Tag { id: tag_id } , id )
252252 end
253253
254- def set_refined_tag ( _root , ~m( community_id thread id topic) a , _info ) do
255- CMS . set_refined_tag ( % Community { id: community_id } , thread , topic , id )
256- end
257-
258254 def set_refined_tag ( _root , ~m( community_id thread id) a , _info ) do
259255 CMS . set_refined_tag ( % Community { id: community_id } , thread , id )
260256 end
@@ -263,10 +259,6 @@ defmodule GroupherServerWeb.Resolvers.CMS do
263259 CMS . unset_tag ( thread , % Tag { id: tag_id } , id )
264260 end
265261
266- def unset_refined_tag ( _root , ~m( community_id thread id topic) a , _info ) do
267- CMS . unset_refined_tag ( % Community { id: community_id } , thread , topic , id )
268- end
269-
270262 def unset_refined_tag ( _root , ~m( community_id thread id) a , _info ) do
271263 CMS . unset_refined_tag ( % Community { id: community_id } , thread , id )
272264 end
@@ -279,14 +271,6 @@ defmodule GroupherServerWeb.Resolvers.CMS do
279271 CMS . get_tags ( % Community { raw: community } )
280272 end
281273
282- def get_tags ( _root , ~m( community_id thread topic) a , _info ) do
283- CMS . get_tags ( % Community { id: community_id } , thread , topic )
284- end
285-
286- def get_tags ( _root , ~m( community thread topic) a , _info ) do
287- CMS . get_tags ( % Community { raw: community } , thread , topic )
288- end
289-
290274 def get_tags ( _root , ~m( community_id thread) a , _info ) do
291275 CMS . get_tags ( % Community { id: community_id } , thread )
292276 end
@@ -295,6 +279,10 @@ defmodule GroupherServerWeb.Resolvers.CMS do
295279 CMS . get_tags ( % Community { raw: community } , thread )
296280 end
297281
282+ def get_tags ( _root , ~m( community_id thread) a , _info ) do
283+ CMS . get_tags ( % Community { id: community_id } , thread )
284+ end
285+
298286 def get_tags ( _root , % { thread: _thread } , _info ) do
299287 { :error , "community_id or community is needed" }
300288 end
0 commit comments