eliminación lógica en reportes

This commit is contained in:
Mariela 2022-07-31 17:16:40 -06:00
parent 86cfcc64cd
commit 95d5a5dd0f
1 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,9 @@ export class ReportsService {
}
async remove(id: string) {
return this.reportModel.findByIdAndRemove({ _id: id }).exec();
return this.reportModel.findOneAndUpdate({ _id: id }, {status: '-1'}, {
new: true,
});
}
}