mirror of
https://github.com/wassname/talk.git
synced 2026-07-01 15:11:41 +08:00
Returning dontagree id on post.
This commit is contained in:
@@ -13,7 +13,6 @@ const wrapResponse = (key) => (promise) => {
|
||||
}
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
|
||||
if (err instanceof errors.APIError) {
|
||||
return {
|
||||
errors: [err]
|
||||
@@ -39,7 +38,7 @@ const RootMutation = {
|
||||
return wrapResponse('flag')(Action.create({item_id, item_type, action_type: 'FLAG', group_id: reason, metadata: {message}}));
|
||||
},
|
||||
createDontAgree(_, {dontagree: {item_id, item_type, reason, message}}, {mutators: {Action}}) {
|
||||
return wrapResponse('dontagee')(Action.create({item_id, item_type, action_type: 'DONTAGREE', group_id: reason, metadata: {message}}));
|
||||
return wrapResponse('dontagree')(Action.create({item_id, item_type, action_type: 'DONTAGREE', group_id: reason, metadata: {message}}));
|
||||
},
|
||||
deleteAction(_, {id}, {mutators: {Action}}) {
|
||||
return wrapResponse(null)(Action.delete({id}));
|
||||
|
||||
@@ -601,7 +601,7 @@ input CreateDontAgreeInput {
|
||||
item_type: ACTION_ITEM_TYPE!
|
||||
|
||||
# The reason for not agreeing with the item.
|
||||
reason: String!
|
||||
reason: String
|
||||
|
||||
# An optional message sent with the don't agree action by the user.
|
||||
message: String
|
||||
|
||||
Reference in New Issue
Block a user