aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/disable2fa/+server.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/disable2fa/+server.js')
-rw-r--r--src/routes/(app)/disable2fa/+server.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/routes/(app)/disable2fa/+server.js b/src/routes/(app)/disable2fa/+server.js
index b2bb07ec..1e264398 100644
--- a/src/routes/(app)/disable2fa/+server.js
+++ b/src/routes/(app)/disable2fa/+server.js
@@ -1,13 +1,13 @@
-import { error, json } from '@sveltejs/kit';
-import { auth, post } from '$lib/utils';
+import { error, json } 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));
+ try {
+ let body = await request.json();
+ let res = await post("/disable2fa", body, auth(cookies));
- return json(res);
- } catch (e) {
- throw error(500, 'Problem disabling 2fa');
- }
+ return json(res);
+ } catch (e) {
+ throw error(500, "Problem disabling 2fa");
+ }
}