This commit is contained in:
lendry
2026-06-25 07:23:34 +03:00
parent f2366a69a0
commit 71b270fcb3
19 changed files with 1410 additions and 112 deletions

View File

@@ -514,6 +514,34 @@ export class AuthGrpcController {
return this.profile.setPassword(command.userId, command.password);
}
@GrpcMethod('ProfileService', 'SendPasswordVerificationOtp')
sendPasswordVerificationOtp(command: { userId: string; channel: string }) {
return this.profile.sendPasswordVerificationOtp(command.userId, command.channel as 'sms' | 'email');
}
@GrpcMethod('ProfileService', 'ChangePassword')
changePassword(command: {
userId: string;
newPassword: string;
currentPassword?: string;
otpCode?: string;
otpChannel?: string;
totpCode?: string;
}) {
return this.profile.changePassword(command.userId, command.newPassword, command);
}
@GrpcMethod('ProfileService', 'RemovePassword')
removePassword(command: {
userId: string;
currentPassword?: string;
otpCode?: string;
otpChannel?: string;
totpCode?: string;
}) {
return this.profile.removePassword(command.userId, command);
}
@GrpcMethod('ProfileService', 'SoftDeleteProfile')
softDeleteProfile(command: { userId: string }) {
return this.profile.softDeleteProfile(command.userId);