mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +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}));
|
||||
|
||||
Reference in New Issue
Block a user