Cleanup login client

This commit is contained in:
Chen-I Lim 2021-02-10 14:07:20 -08:00
parent c62e587c85
commit a862a91112

View file

@ -46,9 +46,9 @@ class OctoClient {
} }
const responseJson = (await this.getJson(response)) as {token?: string} const responseJson = (await this.getJson(response)) as {token?: string}
this.token = responseJson.token this.token = responseJson.token || ''
if (responseJson.token !== '') { if (this.token) {
localStorage.setItem('sessionId', this.token || '') localStorage.setItem('sessionId', this.token)
return true return true
} }
return false return false