fix: fix some changes
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user