fix: commit id as version id

This commit is contained in:
Yifei Zhang
2023-03-30 18:15:49 +00:00
parent 83862eae44
commit 2f2e0b6762
2 changed files with 6 additions and 3 deletions

View File

@@ -26,8 +26,10 @@ export const useUpdateStore = create<UpdateStore>()(
}
try {
const data = await (await fetch(FETCH_TAG_URL)).json();
const remoteId = data[0].name as string;
// const data = await (await fetch(FETCH_TAG_URL)).json();
// const remoteId = data[0].name as string;
const data = await (await fetch(FETCH_COMMIT_URL)).json();
const remoteId = (data[0].sha as string).substring(0, 7);
set(() => ({
lastUpdate: Date.now(),
remoteId,