mirror of
https://github.com/Stef-00012/Zipline-Android-App.git
synced 2025-05-11 10:25:59 +02:00
[nobuild] start building skeleton UI - unfinished
This commit is contained in:
parent
90c7833c3d
commit
39f98c08bf
7 changed files with 95 additions and 5 deletions
|
@ -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...";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue