eliminación lógica en reservaciones

This commit is contained in:
Mariela 2022-07-31 17:11:23 -06:00
parent a39dc26216
commit 86cfcc64cd
1 changed files with 3 additions and 1 deletions

View File

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