auth service

This commit is contained in:
Alex Holliday committed 2026-01-07 19:50:06 +00:00
1 parent a3e24b5420
commit 9248870716
29 files changed
+394 -288

No files matched your search

+4 -1
View File
@@ -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);