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
@@ -1,14 +1,10 @@
import type { PageServerLoad, Actions } from './$types';
import { fail } from '@sveltejs/kit';
import { toDatedTrack, toPage } from '$lib/server/mappers';
import {
apiFor,
authedAction,
failOnError,
formString,
requireUser,
unwrapOrError
} from '$lib/server/api';
import { apiFor, failOnError, unwrapOrError } from '$lib/server/api';
import { requireUser } from '$lib/server/guards';
import { formString } from '$lib/server/forms/fields';
import { authedAction } from '$lib/server/actions/authedAction';
import { LIBRARY_PAGE_SIZE } from '$lib/config';
export const load: PageServerLoad = async ({ locals, url, fetch }) => {