From 2dbd724622b8480357453c35573101b41877b035 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Tue, 30 Jul 2024 17:39:41 +0200 Subject: [PATCH] Formatting --- src/routes/+page.svelte | 22 +++++++++++----------- src/routes/names/+server.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a270820..435c22b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -4,7 +4,7 @@ import AutoComplete from 'simple-svelte-autocomplete'; export let form: ActionData; - + let selectedName: String; let toCreate = ''; @@ -25,9 +25,9 @@ .map(([k, v]) => `${(size / k).toFixed(1)} ${v}B`)[0] ?? `${size} bytes` ); }; - + async function loadNames(keyword: String) { - const url = "./names"; + const url = './names'; const response = await fetch(url); return await response.json(); } @@ -54,14 +54,14 @@
-
{#if form?.field === 'name'} diff --git a/src/routes/names/+server.ts b/src/routes/names/+server.ts index e77a5f6..c0adecf 100644 --- a/src/routes/names/+server.ts +++ b/src/routes/names/+server.ts @@ -6,7 +6,7 @@ export function GET() { const names = readdirSync(storagePath).filter((f) => statSync(`${storagePath}/${f}`).isDirectory() ); - names.sort() + names.sort(); return json(names); }