Move library album and track operations into shared server modules

This commit is contained in:
2026-09-25 01:15:04 +02:00
parent 797bed8e7d
commit 7cac6ff446
14 changed files with 229 additions and 139 deletions
@@ -6,3 +6,10 @@ export function formFile(form: FormData, key: string): File | null {
const value = form.get(key);
return value instanceof File && value.size > 0 ? value : null;
}
export function formIds(form: FormData, key: string): string[] {
return form
.getAll(key)
.flatMap((value) => String(value).split(','))
.filter(Boolean);
}