When banning without commentid.

This commit is contained in:
gaba
2016-11-21 12:42:14 -08:00
parent 3337e95a6c
commit 8355f441e3
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -441,6 +441,7 @@ UserService.ban = (id, comment_id) => {
.then(() => {
// Set status of the user to banned
return UserService.setStatus(id, 'banned').then(() => {
// Only if it was rejected based on a specific comment.
// Reject the comment that the user was ban for.
return Comment.setStatus(comment_id, 'rejected');
});