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.

464 B
Raw Blame
import { assignmentSchema, type AssignmentStayRequest } from '@trek/shared';
import { apiClient } from './client';

/** How long the drive stands at one visit (#3092); null hands it back to the place's stay. */
export async function saveAssignmentStay(tripId: number | string, id: number, body: AssignmentStayRequest) {
  const saved = await apiClient.put(`/trips/${tripId}/assignments/${id}/stay`, body);
  return assignmentSchema.parse(saved.data.assignment);
}