From 1804ec0c9ee504c413460a83100b36721620132f Mon Sep 17 00:00:00 2001 From: Michael Mainguy Date: Fri, 13 Oct 2023 09:30:05 -0500 Subject: [PATCH] Updated user function --- netlify/functions/users/users.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netlify/functions/users/users.ts b/netlify/functions/users/users.ts index b39b241..70d7a40 100644 --- a/netlify/functions/users/users.ts +++ b/netlify/functions/users/users.ts @@ -25,13 +25,14 @@ export const handler: Handler = async (event: HandlerEvent, context: HandlerCont 'Access-Control-Allow-Credentials': 'true' }, statusCode: 200, - body: data + body: JSON.stringify({data: data}) } } catch (err) { console.log(err); + const response = {err: err}; return { statusCode: 500, - body: err + body: JSON.stringify(response) } } } \ No newline at end of file