More robust reactions

This commit is contained in:
Chi Vinh Le
2017-06-13 22:02:54 +07:00
parent aed265efcc
commit 7d8f2aa876
6 changed files with 98 additions and 22 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ const createAction = async ({user = {}}, {item_id, item_type, action_type, group
* Deletes an action based on the user id if the user owns that action.
* @param {Object} user the user performing the request
* @param {String} id the id of the action to delete
* @return {Promise} resolves when the action is deleted
* @return {Promise} resolves to the deleted action, or null if not found.
*/
const deleteAction = ({user}, {id}) => {
return ActionModel.findOneAndRemove({