完善更新提醒
This commit is contained in:
parent
1ac9639f59
commit
0971e100a4
@ -1 +1 @@
|
||||
1.0.11
|
||||
1.0.121
|
||||
File diff suppressed because one or more lines are too long
@ -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("无法获取版本信息"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user