完善更新提醒

This commit is contained in:
ACT丶流星雨 2026-04-06 03:30:51 +08:00
parent 1ac9639f59
commit 0971e100a4
3 changed files with 474 additions and 473 deletions

View File

@ -1 +1 @@
1.0.11
1.0.121

File diff suppressed because one or more lines are too long

View File

@ -23,11 +23,12 @@ export default router.post(
"/",
validateFields({
source: z.enum(["toonflow", "github", "gitee", "atomgit"]),
url: z.url().optional(),
}),
async (req, res) => {
const { source } = req.body;
const { source, url } = req.body;
const getUrl = "https://toonflow.oss-cn-beijing.aliyuncs.com/update.json";
const getUrl = url ?? "https://toonflow.oss-cn-beijing.aliyuncs.com/update.json";
const versionInfo = await fetch(getUrl).then((res) => res.json());
if (!versionInfo) return res.status(400).send(error("无法获取版本信息"));