fix: fix some changes
This commit is contained in:
@@ -3,9 +3,9 @@ Authorization: Bearer {{$global.accessToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"question": 4,
|
||||
"text": "Option 2",
|
||||
"value": 1,
|
||||
"order": 2,
|
||||
"score": 2
|
||||
"question": 2,
|
||||
"text": "Option 3",
|
||||
"value": 3,
|
||||
"order": 3,
|
||||
"score": 6
|
||||
}
|
||||
@@ -3,12 +3,11 @@ Authorization: Bearer {{$global.accessToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"test": 4,
|
||||
"content": "سوال پنجم",
|
||||
"order": 4,
|
||||
"test": 1,
|
||||
"content": "سوال سوم",
|
||||
"required": true,
|
||||
"type": "numeric",
|
||||
"metadata": { "min": 1, "max": 100 }
|
||||
"metadata": { "min": 1, "max": 20 }
|
||||
}
|
||||
|
||||
POST {{baseUrl}}/admin/questions/range-rules
|
||||
@@ -16,8 +15,8 @@ Authorization: Bearer {{$global.accessToken}}
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"question": 8,
|
||||
"question": 3,
|
||||
"min": 1,
|
||||
"max": 5,
|
||||
"score": 7
|
||||
"max": 10,
|
||||
"score": 10
|
||||
}
|
||||
@@ -3,9 +3,8 @@ Content-Type: application/json
|
||||
Authorization: Bearer {{$global.accessToken}}
|
||||
|
||||
{
|
||||
"title": "Test Five",
|
||||
"description": "Description Five",
|
||||
"title": "Test One",
|
||||
"description": "Description One",
|
||||
"accessType": "login",
|
||||
"price": "1234000",
|
||||
"isActive": true
|
||||
}
|
||||
@@ -2,8 +2,8 @@ POST {{baseUrl}}/auth/verify-otp
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"phone": "09365858721",
|
||||
"otp": "40023"
|
||||
"phone": "09333026363",
|
||||
"otp": "87074"
|
||||
}
|
||||
|
||||
{{
|
||||
|
||||
@@ -52,8 +52,9 @@ export class LoginProvider {
|
||||
return {
|
||||
newUser: true,
|
||||
message,
|
||||
otpExpiresAt: otpCode.expiresAt,
|
||||
// Just for development
|
||||
code: otpCode,
|
||||
code: otpCode.code,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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 };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,8 +4,8 @@ Authorization: Bearer {{$global.accessToken}}
|
||||
lang: fa
|
||||
|
||||
{
|
||||
"firstName": "تست",
|
||||
"lastName": "تستعلی",
|
||||
"firstName": "رادمهر",
|
||||
"lastName": "ترناس",
|
||||
"password": "Password1@",
|
||||
"confirmPassword": "Password1@"
|
||||
}
|
||||
Reference in New Issue
Block a user