统一前后端代码格式化配置
This commit is contained in:
@@ -64,7 +64,10 @@ export function assertOpen91QueryPayload(payload: JsonObject, config = assertOpe
|
||||
assertOpen91CommonPayload(payload, config)
|
||||
}
|
||||
|
||||
export function assertOpen91Timestamp(timestamp: unknown, toleranceSeconds = assertOpen91Config().timestampToleranceSeconds) {
|
||||
export function assertOpen91Timestamp(
|
||||
timestamp: unknown,
|
||||
toleranceSeconds = assertOpen91Config().timestampToleranceSeconds,
|
||||
) {
|
||||
const nowSeconds = Math.floor(Date.now() / 1000)
|
||||
if (Math.abs(nowSeconds - Number(timestamp)) > Math.max(1, Number(toleranceSeconds) || 600)) {
|
||||
throw createHttpError('timestamp 已过期', {
|
||||
|
||||
Reference in New Issue
Block a user