Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-08-08 13:36:52 +02:00
parent 74bf6c78eb
commit 0913cd19fc
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0

View File

@ -23,5 +23,7 @@ export function handle (req: string | null, serverEndpoint: string): { statusCod
if (req === null) return { statusCode: 401, body: 'unauthorized' }
const resp = handleRequest(JSON.parse(req), serverEndpoint)
if (resp.error !== undefined) { return { statusCode: 401, body: '' } }
return { statusCode: 200, body: JSON.stringify(resp.result) }
return {
statusCode: 200, body: JSON.stringify(resp.result)
}
}