add deleteTenant method to user service

This commit is contained in:
Eduardo Quiros 2022-08-21 04:31:46 -06:00
parent 8096200886
commit 25344faca0
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 6 additions and 0 deletions

View File

@ -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) { async validateEmail(email: string) {
let repo1 = this.userModel; let repo1 = this.userModel;
return new Promise<User>((resolve, reject) => { return new Promise<User>((resolve, reject) => {