Add SMS OTP, harden auth, and fix order/checkout server bugs.
Ship 4-digit OTP with rate-limit attempts, Tehran-safe expiry/rass math, larger JSON body limit for check images, and safer order pricing/status guards. Include rebuilt dist for prebuilt deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Vendored
+7
-3
@@ -84,7 +84,8 @@ let CustomersService = class CustomersService {
|
||||
return this.map(customer);
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof client_1.Prisma.PrismaClientKnownRequestError && e.code === 'P2002') {
|
||||
if (e instanceof client_1.Prisma.PrismaClientKnownRequestError &&
|
||||
e.code === 'P2002') {
|
||||
throw new common_1.ConflictException('این شماره قبلاً ثبت شده است');
|
||||
}
|
||||
throw e;
|
||||
@@ -100,7 +101,9 @@ let CustomersService = class CustomersService {
|
||||
}
|
||||
let firstName;
|
||||
let lastName;
|
||||
if (dto.name !== undefined || dto.firstName !== undefined || dto.lastName !== undefined) {
|
||||
if (dto.name !== undefined ||
|
||||
dto.firstName !== undefined ||
|
||||
dto.lastName !== undefined) {
|
||||
const names = this.resolveNames(dto);
|
||||
firstName = names.firstName;
|
||||
lastName = names.lastName;
|
||||
@@ -127,7 +130,8 @@ let CustomersService = class CustomersService {
|
||||
return this.map(customer);
|
||||
}
|
||||
catch (e) {
|
||||
if (e instanceof client_1.Prisma.PrismaClientKnownRequestError && e.code === 'P2002') {
|
||||
if (e instanceof client_1.Prisma.PrismaClientKnownRequestError &&
|
||||
e.code === 'P2002') {
|
||||
throw new common_1.ConflictException('این شماره قبلاً ثبت شده است');
|
||||
}
|
||||
throw e;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user