touchups after refactor
This commit is contained in:
@@ -7,7 +7,8 @@ export async function activities_index(author: string, page: number = 1, perPage
|
||||
const r = await f('/api/v1/activity?' + new URLSearchParams({
|
||||
"perPage": perPage.toString(),
|
||||
page: page.toString(),
|
||||
filter: `author="${author}"`
|
||||
filter: `author="${author}"`,
|
||||
sort: "-created"
|
||||
}), {
|
||||
method: 'GET',
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function notifications_index(data: { recipient: string, seen?: bool
|
||||
filter: `created>=@month&&recipient='${data.recipient}'` + (data.seen !== undefined ? `&&seen=${data.seen}` : ''),
|
||||
sort: '+seen,-created',
|
||||
page: page.toString(),
|
||||
"per-page": perPage.toString()
|
||||
"perPage": perPage.toString()
|
||||
}), {
|
||||
method: 'GET',
|
||||
})
|
||||
|
||||
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user