fix: fix some changes

This commit is contained in:
2026-07-13 17:04:00 +03:30
parent 4e4731dbde
commit 4e400d79e8
8 changed files with 39 additions and 22 deletions
+4 -2
View File
@@ -32,7 +32,9 @@ export class OtpService {
/**
* Create new OTP record
*/
public async createOTP(phone: string): Promise<string> {
public async createOTP(
phone: string,
): Promise<{ code: string; expiresAt: Date }> {
// OTP request Rate limit
const lastOTP = await this.otpRepository.findOne({
where: { phone },
@@ -54,7 +56,7 @@ export class OtpService {
await this.otpRepository.save(otp);
return code;
return { code, expiresAt: otp.expiresAt };
}
/**