From 25344faca01dc325466fbd52a17ed155153887e3 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sun, 21 Aug 2022 04:31:46 -0600 Subject: [PATCH] add deleteTenant method to user service --- servicio-usuarios/src/users/users.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/servicio-usuarios/src/users/users.service.ts b/servicio-usuarios/src/users/users.service.ts index dc2549d2..26ae3c95 100644 --- a/servicio-usuarios/src/users/users.service.ts +++ b/servicio-usuarios/src/users/users.service.ts @@ -196,6 +196,12 @@ export class UsersService { }); } + async deleteTenant(id: string) { + return this.userModel.findOneAndUpdate({ _id: id }, { status: '-1' }, { + new: true, + }); + } + async validateEmail(email: string) { let repo1 = this.userModel; return new Promise((resolve, reject) => {