adds svelte API
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user