mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
Moved tag creation into mutator
This commit is contained in:
@@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user