load videopath from backend

correctly redirect to login page if login fails
This commit is contained in:
lukas 2021-05-09 19:38:59 +02:00
parent f7705aef98
commit da07dc04bd

View File

@ -64,7 +64,8 @@ export namespace token {
console.log(APiHost);
fetch(APiHost + 'token', {method: 'POST', body: formData}).then((response) =>
fetch(APiHost + 'token', {method: 'POST', body: formData})
.then((response) =>
response.json().then((result: APIToken) => {
if (result.error) {
callFuncQue(result.error);
@ -79,7 +80,10 @@ export namespace token {
// call all handlers and release flag
callFuncQue('');
})
);
)
.catch((e) => {
callback(e);
});
}
export function apiTokenValid(): boolean {