aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/support/+page.server.js
blob: 02c5e3b3236bb7e85c83517056e8b7a9615f97c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { post } from '$lib/utils';
import { invalid } from '@sveltejs/kit';

export const actions = {
	default: async ({ cookies, request }) => {
		let form = Object.fromEntries(await request.formData());

		try {
			await post('/email', form);
		} catch (e) {
			return invalid(400, { error: e.message });
		}

		return { success: true };
	}
};