diff --git a/src/routes/names/+server.ts b/src/routes/names/+server.ts index 6c7a633..c4c9aa1 100644 --- a/src/routes/names/+server.ts +++ b/src/routes/names/+server.ts @@ -4,8 +4,9 @@ import { readdirSync, statSync } from 'fs'; import type { RequestHandler } from './$types'; export const GET: RequestHandler = () => { - let names = readdirSync(storagePath).filter((f) => statSync(`${storagePath}/${f}`).isDirectory()); - names = names.toSorted(); + const names = readdirSync(storagePath) + .filter((f) => statSync(`${storagePath}/${f}`).isDirectory()) + .toSorted(); return json(names); };