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
+3
-3
@@ -1,14 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.computeCashInvoiceExpiry = computeCashInvoiceExpiry;
|
||||
const tehran_time_1 = require("./tehran-time");
|
||||
function computeCashInvoiceExpiry(company) {
|
||||
const now = new Date();
|
||||
if (company.cashInvoiceValidUntilHour != null &&
|
||||
Number.isFinite(company.cashInvoiceValidUntilHour)) {
|
||||
const expires = new Date(now);
|
||||
expires.setHours(company.cashInvoiceValidUntilHour, 0, 0, 0);
|
||||
const expires = (0, tehran_time_1.tehranAtHour)(now, company.cashInvoiceValidUntilHour);
|
||||
if (expires.getTime() <= now.getTime()) {
|
||||
expires.setDate(expires.getDate() + 1);
|
||||
return (0, tehran_time_1.tehranAtHour)((0, tehran_time_1.addDays)(now, 1), company.cashInvoiceValidUntilHour);
|
||||
}
|
||||
return expires;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user