mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 08:11:03 +00:00
2c3b20bb57
PAD-03 portages and locks on planned tours and recorded tracks, PAD-07 paddle time with portage and lock stops, PAD-08 wind forecast for the start, PAD-05A regional obstacle import from Geofabrik extracts with admin endpoints and a monthly refresh, PAD-05B first cut of the obstacle layer on Leaflet, GL and 3D. Work in progress: checklist (PAD-06), check bench (PAD-09), admin UI, translations and tests follow.
11 lines
462 B
TypeScript
11 lines
462 B
TypeScript
import { windForecastResponseSchema, type WindForecastResponse } from '@trek/shared';
|
|
import apiClient from './client';
|
|
|
|
/** PAD-08: the wind forecast for one place and one day. */
|
|
export const windApi = {
|
|
forecast: (lat: number, lng: number, date: string, signal?: AbortSignal): Promise<WindForecastResponse> =>
|
|
apiClient
|
|
.get('/weather/wind', { params: { lat, lng, date }, signal })
|
|
.then((r) => windForecastResponseSchema.parse(r.data)),
|
|
};
|