core: use postinit status code

This commit is contained in:
2024-01-08 20:57:43 +01:00
parent 6f9903e309
commit 476ed0b833
12 changed files with 87 additions and 89 deletions

View File

@ -26,11 +26,8 @@ class Tourmanents
{
let response = await this.client._post("/api/tournaments/", {nb_players: nb_players, nb_players_by_game: nb_players_by_game, name: name});
if (response.status === 403)
{
this.client._update_logged(false);
return null;
}
if (response.status !== 200)
return response.status;
let response_data = await response.json();
return response_data;