feat: 添加更新路由,支持获取最新版本信息,并实现相关测试用例

This commit is contained in:
ryan
2026-03-11 13:56:11 +08:00
parent ad090c9c04
commit 7a1abe008c
4 changed files with 193 additions and 4 deletions
@@ -89,10 +89,13 @@ const OtherSetting = () => {
};
const checkUpdate = async () => {
const res = await API.get(
'https://api.github.com/repos/Rain-kl/ATSFlare/releases/latest'
);
const { tag_name, body } = res.data;
const res = await API.get('/api/update/latest-release');
const { success, message, data } = res.data;
if (!success) {
showError(message);
return;
}
const { tag_name, body } = data;
if (
hasBuildVersion() &&
normalizeVersion(tag_name) === getBuildVersion()