touchups after refactor

This commit is contained in:
Christian Beutel
2025-01-03 00:13:59 +01:00
parent 871481a84e
commit 0d2e71c2f6
32 changed files with 1157 additions and 45 deletions

View File

@@ -18,7 +18,7 @@ export const editTrail: Writable<Trail> = writable(new Trail(""));
export async function trails_index(perPage: number = 21, random: boolean = false, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
const r = await f('/api/v1/trail?' + new URLSearchParams({
"per-page": perPage.toString(),
"perPage": perPage.toString(),
expand: "category,waypoints,summit_logs",
sort: random ? "@random" : "",
}), {
@@ -102,7 +102,7 @@ export async function trails_search_bounding_box(northEast: M.LngLat, southWest:
}
r = await fetch('/api/v1/trail?' + new URLSearchParams({
"per-page": "-1",
"perPage": "-1",
filter: `'${trailIds.join(',')}'~id`,
expand: "category,waypoints,summit_logs",
sort: `+name`,