Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

598 B
Raw Blame
import { tourDetailResponseSchema, type TourDetailResponse, type TourObstacleReviewsRequest } from '@trek/shared';
import apiClient from './client';

/** PAD-06: what the paddlers decided about the obstacles of a paddle tour; answers the detail with its checklist. */
export const tourObstacleReviewsApi = {
  save: (
    tripId: number | string,
    placeId: number | string,
    body: TourObstacleReviewsRequest
  ): Promise<TourDetailResponse> =>
    apiClient
      .put(`/trips/${tripId}/tours/${placeId}/obstacle-reviews`, body)
      .then((r) => tourDetailResponseSchema.parse(r.data)),
};