more file formats && list add in edit

This commit is contained in:
Christian Beutel
2024-03-27 18:43:46 +01:00
parent ded0ea4f80
commit 340a3c7c05
15 changed files with 1498 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ import { ClientResponseError } from "pocketbase";
export const categories: Writable<Category[]> = writable([])
export async function categories_index(f: Function = fetch) {
export async function categories_index(f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
const r = await f('/api/v1/category', {
method: 'GET',
})

View File

@@ -167,7 +167,7 @@ export async function trails_search_bounding_box(northEast: LatLng, southWest: L
export async function trails_show(id: string, loadGPX?: boolean, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
const r = await f(`/api/v1/trail/${id}?` + new URLSearchParams({
expand: "category,waypoints,summit_logs",
expand: "category,waypoints,summit_logs,lists_via_trails",
}), {
method: 'GET',
})