feat: 检测软件更新地址需要传入变量

This commit is contained in:
hzm
2026-02-25 09:50:56 +08:00
parent 43206e816f
commit d73a9ef9fa
8 changed files with 23 additions and 3 deletions

View File

@@ -432,7 +432,10 @@ export const fetchShanghaiIndexDate = async () => {
};
export const fetchLatestRelease = async () => {
const res = await fetch('https://api.github.com/repos/hzm0321/real-time-fund/releases/latest');
const url = process.env.NEXT_PUBLIC_GITHUB_LATEST_RELEASE_URL;
if (!url) return null;
const res = await fetch(url);
if (!res.ok) return null;
const data = await res.json();
return {