diff options
| author | Adam Soltys <[email protected]> | 2026-02-11 17:51:24 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 17:51:24 -0800 |
| commit | 13466248004327e9a026cb89f94926f9b060d1c1 (patch) | |
| tree | 47b4972c33809ccdf866b043c92cd3e0ecf5dcd0 /src/lib/settings.ts | |
| parent | 3aa9ce1b5985397d7f568887ec6f881df13c1034 (diff) | |
| download | coinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.tar.gz coinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.zip | |
linting
Diffstat (limited to 'src/lib/settings.ts')
| -rw-r--r-- | src/lib/settings.ts | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/settings.ts b/src/lib/settings.ts index 6f4d3f62..a3b875c0 100644 --- a/src/lib/settings.ts +++ b/src/lib/settings.ts @@ -2,28 +2,28 @@ import { auth, fd, post } from "$lib/utils"; import { fail } from "@sveltejs/kit"; type Error = { - message: string; + message: string; }; export default async ({ cookies, request }) => { - const form = await fd(request); + const form = await fd(request); - if (form.tab === "account") { - form.notify = form.notify === "on"; - form.push = form.push === "on"; - form.nip5 = form.nip5 === "on"; - form.prompt = form.prompt === "on"; - form.autowithdraw = form.autowithdraw === "on"; - } + if (form.tab === "account") { + form.notify = form.notify === "on"; + form.push = form.push === "on"; + form.nip5 = form.nip5 === "on"; + form.prompt = form.prompt === "on"; + form.autowithdraw = form.autowithdraw === "on"; + } - try { - const { user } = await post("/user", form, auth(cookies)); + try { + const { user } = await post("/user", form, auth(cookies)); - if (user.language) cookies.set("lang", user.language, { path: "/" }); + if (user.language) cookies.set("lang", user.language, { path: "/" }); - return { user, success: true }; - } catch (e) { - const { message } = e as Error; - return fail(400, { message }); - } + return { user, success: true }; + } catch (e) { + const { message } = e as Error; + return fail(400, { message }); + } }; |
