adds svelte API

This commit is contained in:
Christian Beutel
2024-03-09 16:46:02 +01:00
parent 33c3b273ab
commit 1b493f576e
114 changed files with 1574 additions and 2528 deletions

View File

@@ -3,7 +3,7 @@ import { categories_index } from "$lib/stores/category_store";
import { trails_search_filter } from "$lib/stores/trail_store";
import type { ServerLoad } from "@sveltejs/kit";
export const load: ServerLoad = async ({ params, locals, url }) => {
export const load: ServerLoad = async ({ params, locals, url, fetch }) => {
const filter: TrailFilter = {
q: "",
category: [],
@@ -21,7 +21,7 @@ export const load: ServerLoad = async ({ params, locals, url }) => {
if (paramCategory) {
filter.category.push(paramCategory);
}
await trails_search_filter(filter);
await trails_search_filter(filter, fetch);
await categories_index()
return {filter};