blob: 4841153932a3a19568cc940cf576790f803b78d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import { fail, redirect } from "@sveltejs/kit";
import { fd, post, login } from "$lib/utils";
export const actions = {
default: async ({ request }) => {
try {
let { email } = await fd(request);
await post("/forgot", { email });
return { success: true };
} catch (e) {
return fail(400, { error: e.message });
}
},
};
|