summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/routes/artists/+page.ts
blob: 5a76550ea9a7271f9f6ae1cc9d94c630bc01afef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { ArtistSort, type ArtistFilterInput } from '$gql/graphql';
import { parseFilter, parsePaginationData, parseSortData } from '$lib/Navigation';

export const trailingSlash = 'always';

export function load({ url }: { url: URL; params: Record<string, string> }) {
	return {
		sort: parseSortData(url.searchParams, ArtistSort.Name),
		filter: parseFilter<ArtistFilterInput>(url.searchParams),
		pagination: parsePaginationData(url.searchParams)
	};
}