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