[nobuild] start building skeleton UI - unfinished

This commit is contained in:
Stef-00012 2025-05-04 08:20:48 +02:00
parent 90c7833c3d
commit 39f98c08bf
No known key found for this signature in database
GPG key ID: 28BE9A9E4EF0E6BF
7 changed files with 95 additions and 5 deletions

View file

@ -27,7 +27,28 @@ export async function getVersion(): Promise<APIVersion | string> {
}
| undefined;
if (data) return data.error;
if (data && data.statusCode !== 403) return data.error;
// start: temp fix for non-admins
try {
const res = await axios.head(`${url}/api/server/settings`, {
headers: {
Authorization: token,
},
});
if (res.status !== 404) return {
version: "4.0.0"
}
} catch (e) {
const error = e as AxiosError;
if (error.status !== 404) return {
version: "4.0.0"
}
}
// end: temp fix for non-admins
return "Something went wrong...";
}