更新开发配置,调整项目路径以支持新环境。同时,优化提现管理API,增强安全性和错误处理逻辑,确保数据一致性和用户体验。重构数据库查询逻辑,提升性能和可维护性。

This commit is contained in:
2026-02-06 15:18:36 +08:00
parent 678bf297aa
commit f8fac00c85
7 changed files with 407 additions and 671 deletions

View File

@@ -43,6 +43,7 @@ export function verifyAdminToken(token: string | null | undefined): boolean {
const exp = parseInt(payload, 10)
if (Number.isNaN(exp) || exp < Math.floor(Date.now() / 1000)) return false
const expected = sign(payload)
if (typeof expected !== 'string' || typeof sig !== 'string') return false
if (sig.length !== expected.length) return false
try {
return timingSafeEqual(Buffer.from(sig, 'base64url'), Buffer.from(expected, 'base64url'))