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
+6
-2
@@ -19,7 +19,9 @@ let ChecksService = class ChecksService {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
async findByOrder(orderId) {
|
||||
const order = await this.prisma.order.findUnique({ where: { id: orderId } });
|
||||
const order = await this.prisma.order.findUnique({
|
||||
where: { id: orderId },
|
||||
});
|
||||
if (!order)
|
||||
throw new common_1.NotFoundException('سفارش یافت نشد');
|
||||
const checks = await this.prisma.check.findMany({
|
||||
@@ -45,7 +47,9 @@ let ChecksService = class ChecksService {
|
||||
: check.notes,
|
||||
},
|
||||
});
|
||||
const siblings = await tx.check.findMany({ where: { orderId: check.orderId } });
|
||||
const siblings = await tx.check.findMany({
|
||||
where: { orderId: check.orderId },
|
||||
});
|
||||
const allApproved = siblings.every((c) => c.status === client_1.CheckStatus.approved);
|
||||
const anyRejected = siblings.some((c) => c.status === client_1.CheckStatus.rejected);
|
||||
let nextStatus = null;
|
||||
|
||||
Reference in New Issue
Block a user