Compare commits

..

2 Commits

Author SHA1 Message Date
aixianling
30236e4359 Merge branch 'master' of http://121.41.123.129:35417/kubbo/vless-api 2025-02-28 17:12:42 +08:00
aixianling
1ac6b88e75 refactor(api): 优化客户端添加逻辑
- 修改了 expiryTime 的判断条件,使用不等于 0 替代大于 0,以处理所有非零值
- 优化了代码结构,提高了可读性
2025-02-28 17:08:54 +08:00

View File

@@ -17,7 +17,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;