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'); } } m+xml'/>
aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib/socket.js
blob: b385db9d756cc6f3b3f4421cdeadef32cb45ac47 (plain) (tree)
1
2
3
4
5
6
7
8
9