auth service
This commit is contained in:
1 parent
a3e24b5420
commit
9248870716
29 files changed
+394
-288
No files matched your search
@@ -73,7 +73,10 @@ class RecoveryController implements IRecoveryController {
|
||||
if (!recoveryToken) {
|
||||
throw new ApiError("Invalid recovery token", 400);
|
||||
}
|
||||
await this.authService.changePassword(recoveryToken.userId, password);
|
||||
await this.authService.changePassword(
|
||||
recoveryToken.userId.toString(),
|
||||
password
|
||||
);
|
||||
await this.recoveryService.delete(recoveryToken._id);
|
||||
|
||||
const user = await User.findById(recoveryToken.userId);
|
||||
|
||||
Reference in new issue
Block a user