mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-18 14:23:36 +00: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: '' } }
|
if (resp.error !== undefined) { return { statusCode: 401, body: '' } }
|
||||||
return {
|
return {
|
||||||
statusCode: 200,
|
statusCode: 200,
|
||||||
body: JSON.stringify(resp.result)
|
body: JSON.stringify(resp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user