load videopath from backend
correctly redirect to login page if login fails
This commit is contained in:
parent
f7705aef98
commit
da07dc04bd
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user