showing banner if server under maintenance

closes #2569
This commit is contained in:
Miodec 2022-02-22 21:31:52 +01:00
parent 9b7b0e257e
commit 8dce406786

View file

@ -17,6 +17,15 @@ function setMemory(id: string): void {
async function getLatest(): Promise<MonkeyTypes.PSA[]> {
const response = await Ape.psas.get();
if (response.message === "Server is down for maintenance") {
Notifications.addBanner(
"Server is currently under maintenance",
-1,
"bullhorn",
true
);
return [];
}
return response.data as MonkeyTypes.PSA[];
}