@@ -8,7 +8,7 @@ defmodule GroupherServerWeb.Resolvers.CMS do
88 alias GroupherServer . { Accounts , CMS }
99
1010 alias Accounts.User
11- alias CMS . { Post , Repo , Job , Community , Category , Tag , Thread }
11+ alias CMS . { Community , Category , Tag , Thread }
1212
1313 alias Helper.ORM
1414
@@ -54,26 +54,16 @@ defmodule GroupherServerWeb.Resolvers.CMS do
5454 CMS . read_article ( thread , id )
5555 end
5656
57- def wiki ( _root , ~m( community) a , _info ) , do: CMS . get_wiki ( % Community { raw: community } )
58- def cheatsheet ( _root , ~m( community) a , _info ) , do: CMS . get_cheatsheet ( % Community { raw: community } )
59-
60- def paged_posts ( _root , ~m( filter) a , % { context: % { cur_user: user } } ) do
61- Post |> CMS . paged_contents ( filter , user )
57+ def paged_articles ( _root , ~m( thread filter) a , % { context: % { cur_user: user } } ) do
58+ CMS . paged_articles ( thread , filter , user )
6259 end
6360
64- def paged_posts ( _root , ~m( filter) a , _info ) , do: Post |> CMS . paged_contents ( filter )
65-
66- def paged_repos ( _root , ~m( filter) a , % { context: % { cur_user: user } } ) do
67- Repo |> CMS . paged_contents ( filter , user )
61+ def paged_articles ( _root , ~m( thread filter) a , _info ) do
62+ CMS . paged_articles ( thread , filter )
6863 end
6964
70- def paged_repos ( _root , ~m( filter) a , _info ) , do: Repo |> CMS . paged_contents ( filter )
71-
72- def paged_jobs ( _root , ~m( filter) a , % { context: % { cur_user: user } } ) do
73- Job |> CMS . paged_contents ( filter , user )
74- end
75-
76- def paged_jobs ( _root , ~m( filter) a , _info ) , do: Job |> CMS . paged_contents ( filter )
65+ def wiki ( _root , ~m( community) a , _info ) , do: CMS . get_wiki ( % Community { raw: community } )
66+ def cheatsheet ( _root , ~m( community) a , _info ) , do: CMS . get_cheatsheet ( % Community { raw: community } )
7767
7868 def create_content ( _root , ~m( community_id thread) a = args , % { context: % { cur_user: user } } ) do
7969 CMS . create_content ( % Community { id: community_id } , thread , args , user )
0 commit comments