Moved tag creation into mutator

This commit is contained in:
Wyatt Johnson
2017-02-10 12:00:50 -07:00
parent 7325525716
commit c637be364a
3 changed files with 48 additions and 32 deletions
+6
View File
@@ -36,6 +36,12 @@ const createComment = ({user, loaders: {Comments}}, {body, asset_id, parent_id =
}
}
if (user.hasRoles('ADMIN')) {
return CommentsService
.addTag(comment.id, 'STAFF', user.id)
.then(() => comment);
}
return comment;
});
};