mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 02:56:16 +08:00
parent
9b7b0e257e
commit
8dce406786
1 changed files with 9 additions and 0 deletions
|
@ -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[];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue