log out when the auth token is expired
This commit is contained in:
parent
d60eb5e022
commit
be38392192
1 changed files with 3 additions and 1 deletions
|
@ -128,7 +128,9 @@ export default class User {
|
||||||
);
|
);
|
||||||
list = JSON.parse(textDecoder.decode(decrypted));
|
list = JSON.parse(textDecoder.decode(decrypted));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//
|
if (e.message === '401') {
|
||||||
|
return this.logout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
changes = await this.storage.merge(list);
|
changes = await this.storage.merge(list);
|
||||||
if (!changes.outgoing) {
|
if (!changes.outgoing) {
|
||||||
|
|
Loading…
Reference in a new issue