From 91ac92719a867ea425b62c6f08fb1c0525bd9405 Mon Sep 17 00:00:00 2001 From: Mariela Date: Sun, 31 Jul 2022 17:17:25 -0600 Subject: [PATCH] =?UTF-8?q?eliminaci=C3=B3n=20l=C3=B3gica=20en=20invitados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- servicio-invitados/src/guests/guests.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servicio-invitados/src/guests/guests.service.ts b/servicio-invitados/src/guests/guests.service.ts index 97e1c4bd..02379936 100644 --- a/servicio-invitados/src/guests/guests.service.ts +++ b/servicio-invitados/src/guests/guests.service.ts @@ -32,6 +32,8 @@ export class GuestsService { } async remove(id: string) { - return this.guestModel.findByIdAndRemove({ _id: id }).exec(); + return this.guestModel.findOneAndUpdate({ _id: id }, {status: '-1'}, { + new: true, + }); } }