Split the server API module into client, guards, form fields and action helpers

This commit is contained in:
2026-09-24 13:59:21 +02:00
parent 155f0e2b6a
commit 351b333529
21 changed files with 99 additions and 97 deletions
@@ -0,0 +1,8 @@
export function formString(form: FormData, key: string): string {
return String(form.get(key) ?? '');
}
export function formFile(form: FormData, key: string): File | null {
const value = form.get(key);
return value instanceof File && value.size > 0 ? value : null;
}