accounts fix

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-08-09 10:00:14 +02:00
parent eac3f107ef
commit 417d546c26
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,6 @@ export function handle (req: string | null | undefined, serverEndpoint: string):
if (resp.error !== undefined) { return { statusCode: 401, body: '' } } if (resp.error !== undefined) { return { statusCode: 401, body: '' } }
return { return {
statusCode: 200, statusCode: 200,
body: JSON.stringify(resp.result) body: JSON.stringify(resp)
} }
} }

View File

@ -59,9 +59,10 @@ export async function doLogin (
body: serialize(request) body: serialize(request)
}) })
const result: Response<any> = await response.json() const result: Response<any> = await response.json()
console.log('login result', result)
return [result.error ?? OK, result.result] return [result.error ?? OK, result.result]
} catch (err) { } catch (err) {
console.log('login error', err)
return [unknownError(err), undefined] return [unknownError(err), undefined]
} }
} }