aboutsummaryrefslogblamecommitdiffstats
path: root/src/routes/(app)/sent/[id]/+page.svelte
blob: fb6849f07d88106d94d063354d006bd5982c0d7c (plain) (tree)
63e3eaaa<
import { error } from '@sveltejs/kit';
import { auth, post } from '$lib/utils';

export async function POST({ cookies, request }) {
	try {
		let body = await request.json();
		let res = await post('/disable2fa', body, auth(cookies));

		return new Response(JSON.stringify(res));
	} catch (e) {
		throw error(500, 'Problem disabling 2fa');
	}
}
src/routes/(app)/sent/[id]/+page.svelte?h=ark&id=d0f19f20021cab8c740bda8c3d360748fd6c30de'>^
216a6002 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20