From 14df451c0a0be79e6678e499f946c37f6d91b584 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 17:18:13 -0600 Subject: [PATCH] =?UTF-8?q?eliminaci=C3=B3n=20l=C3=B3gica=20en=20foro=20co?= =?UTF-8?q?municados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/post-comments/post-comments.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servicio-foro-comunicaciones/src/post-comments/post-comments.service.ts b/servicio-foro-comunicaciones/src/post-comments/post-comments.service.ts index 4b8a0c0a..f82b71fa 100644 --- a/servicio-foro-comunicaciones/src/post-comments/post-comments.service.ts +++ b/servicio-foro-comunicaciones/src/post-comments/post-comments.service.ts @@ -33,6 +33,8 @@ export class PostCommentsService { } async remove(id: string) { - return this.commentModel.findByIdAndRemove({ _id: id }).exec(); + return this.commentModel.findOneAndUpdate({ _id: id }, {status: '-1'}, { + new: true, + }); } }