eliminación lógica en foro comunicados

This commit is contained in:
Mariela 2022-07-31 17:18:13 -06:00
parent 91ac92719a
commit 14df451c0a
1 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,8 @@ export class PostCommentsService {
} }
async remove(id: string) { async remove(id: string) {
return this.commentModel.findByIdAndRemove({ _id: id }).exec(); return this.commentModel.findOneAndUpdate({ _id: id }, {status: '-1'}, {
new: true,
});
} }
} }