password reset email

This commit is contained in:
Sean Morley
2024-08-04 17:30:43 -04:00
parent 12595483fc
commit fd94f03008
8 changed files with 165 additions and 25 deletions

View File

@@ -22,8 +22,13 @@ export const actions: Actions = {
email
})
});
if (!res.ok) {
return fail(res.status, { message: await res.json() });
let message = await res.json();
const key = Object.keys(message)[0];
return fail(res.status, { message: message[key] });
}
return { success: true };
}