Sort names before returning

This commit is contained in:
Valentin Brandl 2024-07-30 17:33:21 +02:00
parent 62b1fd98b7
commit fc0de8b7e0
Signed by: vbrandl
GPG Key ID: CAD4DA1A789125F9

View File

@ -6,6 +6,7 @@ export function GET() {
const names = readdirSync(storagePath).filter((f) =>
statSync(`${storagePath}/${f}`).isDirectory()
);
names.sort()
return json(names);
}