Homepage redirect on wrong Player id

This commit is contained in:
2021-06-08 18:12:09 +00:00
parent f0bc0c29dd
commit 7d44ffa225
9 changed files with 91 additions and 45 deletions

View File

@ -37,9 +37,12 @@ export function callAPI<T>(
.then((response) => {
if (response.status === 200) {
// success
response.json().then((result: T) => {
callback(result);
});
response
.json()
.then((result: T) => {
callback(result);
})
.catch((reason) => errorcallback(reason));
} else if (response.status === 400) {
// Bad Request --> invalid token
console.log('loading Password page.');