mirror of
https://github.com/wassname/talk.git
synced 2026-07-26 13:37:38 +08:00
Fix changeStatus
This commit is contained in:
+9
-8
@@ -425,15 +425,16 @@ UserService.setStatus = (id, status, comment_id) => {
|
||||
if (status === 'banned') {
|
||||
return UserService.disableUser(id)
|
||||
.then(() => {
|
||||
return Comment.setStatus(comment_id, 'rejected').then(() => {
|
||||
return UserModel.update({
|
||||
id: id
|
||||
}, {
|
||||
$set: {
|
||||
status: status
|
||||
}
|
||||
return Comment.changeStatus(comment_id, 'rejected')
|
||||
.then(() => {
|
||||
return UserModel.update({
|
||||
id: id
|
||||
}, {
|
||||
$set: {
|
||||
status: status
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user