From b03396a46777db70a31522f7ef173c92c94b8c41 Mon Sep 17 00:00:00 2001 From: Kubbo <390378816@qq.com> Date: Fri, 7 Mar 2025 18:29:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E4=BC=98=E5=8C=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复到期时间判断逻辑,提高代码可读性 - 完善错误信息提示,方便排查问题 --- api/client/add.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/client/add.js b/api/client/add.js index b6935ed..607b23a 100644 --- a/api/client/add.js +++ b/api/client/add.js @@ -16,7 +16,7 @@ module.exports = async (ctx) => { if (!inbound?.success) return (ctx.body = { code: "1", msg: "获取节点失败" }); const uuid = randomUUID(); email = email || uuid.split("-")[0]; - if (expiryTime!=0) { + if (expiryTime != 0) { expiryTime = dayjs(expiryTime, "YYYY-MM-DD HH:mm:ss").valueOf(); } totalGB = totalGB * 1024 * 1024 * 1024; @@ -37,7 +37,7 @@ module.exports = async (ctx) => { } else { ctx.body = { code: 1, - message: "添加失败", + message: "添加失败:" + result?.msg || "未知原因", data: ctx.request.body, }; }