Files
TREK/client/src/api/placeHistory.ts
T
Maurice d008331e5f feat(places): notes, visits, tours, history, tags and location in the place sheet, saved lists on the trip map
Both the desktop sheet and the phone sheet of All places show the place's
location as a badge, its notes per list, its visits from trips (hidden without
any), linked tours and bookings, its change history and the reader's own tags
with a tag filter. A trip map can show the places of linked lists and add one
to the trip. All places reloads after a list is added or removed.
2026-11-29 21:16:51 +01:00

16 lines
605 B
TypeScript

import type { PlaceHistoryPageResponse, PlaceHistoryQueryInput, PlacesLibraryKind } from '@trek/shared';
import apiClient from './client';
const base = '/addons/collections/library/places';
/** PLC-14: what changed in the details of an entry of All places, opened from a trip place or a saved place. */
export const placeHistoryApi = {
history: (
kind: PlacesLibraryKind,
id: number,
query: PlaceHistoryQueryInput = {},
signal?: AbortSignal
): Promise<PlaceHistoryPageResponse> =>
apiClient.get(`${base}/${kind}/${id}/history`, { params: query, signal }).then((r) => r.data),
};