mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-30 02:37:46 +03:00
accounts fix
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
eac3f107ef
commit
417d546c26
@ -25,6 +25,6 @@ export function handle (req: string | null | undefined, serverEndpoint: string):
|
||||
if (resp.error !== undefined) { return { statusCode: 401, body: '' } }
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: JSON.stringify(resp.result)
|
||||
body: JSON.stringify(resp)
|
||||
}
|
||||
}
|
||||
|
@ -59,9 +59,10 @@ export async function doLogin (
|
||||
body: serialize(request)
|
||||
})
|
||||
const result: Response<any> = await response.json()
|
||||
|
||||
console.log('login result', result)
|
||||
return [result.error ?? OK, result.result]
|
||||
} catch (err) {
|
||||
console.log('login error', err)
|
||||
return [unknownError(err), undefined]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user