update
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user