user account create

This commit is contained in:
yaschalew
2026-05-26 05:40:53 +03:00
parent 69db7cd960
commit 5a4d6baec2
24 changed files with 3387 additions and 1817 deletions

View File

@@ -0,0 +1,53 @@
// otp.controller.ts
import {
Body,
Controller,
Post,
} from "@nestjs/common";
import { OtpService } from "./otp.service";
import { Public } from "@edr/api-common";
@Controller("otp")
@Public()
export class OtpController {
constructor(
private readonly otpService: OtpService
) {}
// ---------------------------------------------------------------------------
// Send OTP
// ---------------------------------------------------------------------------
@Post("send")
async sendOtp(
@Body("phone")
phone: string,
@Body("otp")
otp: string
) {
return this.otpService.sendOtp(
phone,otp
);
}
// ---------------------------------------------------------------------------
// Verify OTP
// ---------------------------------------------------------------------------
@Post("verify")
async verifyOtp(
@Body("phone")
phone: string,
@Body("otp")
otp: string
) {
return this.otpService.verifyOtp(
phone,
otp
);
}
}