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.

Commit20b0aae

Browse files
committed
chore: wip
1 parent88573ca commit20b0aae

File tree

5 files changed

+15
-122
lines changed

5 files changed

+15
-122
lines changed

‎lib/groupher_server/cms/delegates/community_curd.ex‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ defmodule GroupherServer.CMS.Delegate.CommunityCURD do
5858
@doc"""
5959
create a Tag base on type: post / tuts ...
6060
"""
61-
# TODO: change to create_tag(community, thread, attrs, ....)
6261
defcreate_tag(%Community{id:community_id},thread,attrs,%Accounts.User{id:user_id})do
6362
with{:ok,action}<-match_action(thread,:tag),
6463
{:ok,author}<-ensure_author_exists(%Accounts.User{id:user_id}),

‎lib/groupher_server_web/resolvers/cms_resolver.ex‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,12 @@ defmodule GroupherServerWeb.Resolvers.CMS do
103103
do_pin_content(id,community_id,thread)
104104
end
105105

106-
defpin_content(_root,~m(id community_id)a,_info)do
107-
CMS.pin_content(%CMS.Post{id:id},%Community{id:community_id})
108-
end
109-
110106
defundo_pin_content(_root,~m(id community_id thread)a,_info)do
111107
do_undo_pin_content(id,community_id,thread)
112108
end
113109

114-
defundo_pin_content(_root,~m(idcommunity_id)a,_info)do
115-
CMS.undo_pin_content(%CMS.Post{id:id},%Community{id:community_id})
110+
defdo_pin_content(id,community_id,:post)do
111+
CMS.pin_content(%CMS.Post{id:id},%Community{id:community_id})
116112
end
117113

118114
defdo_pin_content(id,community_id,:job)do
@@ -123,6 +119,10 @@ defmodule GroupherServerWeb.Resolvers.CMS do
123119
CMS.pin_content(%CMS.Repo{id:id},%Community{id:community_id})
124120
end
125121

122+
defdo_undo_pin_content(id,community_id,:post)do
123+
CMS.undo_pin_content(%CMS.Post{id:id},%Community{id:community_id})
124+
end
125+
126126
defdo_undo_pin_content(id,community_id,:job)do
127127
CMS.undo_pin_content(%CMS.Job{id:id},%Community{id:community_id})
128128
end

‎test/groupher_server_web/mutation/cms/cms_test.exs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,17 @@ defmodule GroupherServer.Test.Mutation.CMS.Basic do
216216
assertbelong_community["id"]==to_string(community.id)
217217
end
218218

219-
@tag:wip3
220-
test"auth user create duplicate tag fails",~m(community)ado
221-
variables=mock_attrs(:tag,%{communityId:community.id})
219+
# TODO:@tag :wip2
220+
#test "auth user create duplicate tag fails", ~m(community)a do
221+
# variables = mock_attrs(:tag, %{communityId: community.id})
222222

223-
passport_rules=%{community.title=>%{"post.tag.create"=>true}}
224-
rule_conn=simu_conn(:user,cms:passport_rules)
223+
# passport_rules = %{community.title => %{"post.tag.create" => true}}
224+
# rule_conn = simu_conn(:user, cms: passport_rules)
225225

226-
assertnil!==rule_conn|>mutation_result(@create_tag_query,variables,"createTag")
226+
# assert nil !== rule_conn |> mutation_result(@create_tag_query, variables, "createTag")
227227

228-
assertrule_conn|>mutation_get_error?(@create_tag_query,variables,ecode(:changeset))
229-
end
228+
# assert rule_conn |> mutation_get_error?(@create_tag_query, variables, ecode(:changeset))
229+
#end
230230

231231
# TODO: server return 400 wrong status code
232232
# see https://github.com/absinthe-graphql/absinthe/issues/554

‎test/groupher_server_web/mutation/cms/radar_test.exs‎

Lines changed: 0 additions & 106 deletions
This file was deleted.

‎test/groupher_server_web/query/cms/paged_posts_test.exs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ defmodule GroupherServer.Test.Query.PagedPosts do
186186
assertresults["totalCount"]==1
187187
end
188188

189-
@tag:wip2
189+
@tag:wip
190190
test"read state all filter should work",~m(user)ado
191191
user_conn=simu_conn(:user,user)
192192
{:ok,community}=db_insert(:community)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp