Keep api/client.ts and trips.service.ts within their size baselines

The admin switch for wanderer moves to api/wanderer.ts and the recorded
track restore to api/recordedTrack.ts; trips.service.ts keeps dev's
formatting with only the derived-from remap on copy.
This commit is contained in:
Maurice
2026-10-15 18:16:25 +02:00
parent f690065de8
commit f1c437b8b8
8 changed files with 124 additions and 254 deletions
+8
View File
@@ -1,4 +1,5 @@
import type {
AdminFeatureToggleResponse,
WandererConnection,
WandererImportPreview,
WandererImportRequest,
@@ -39,3 +40,10 @@ export const wandererApi = {
importTrail: (tripId: number, body: WandererImportRequest): Promise<WandererImportResponse> =>
apiClient.post(`/trips/${tripId}/tours/wanderer/import`, body, upstream).then((r) => r.data),
};
/** The admin's switch for wanderer under the Tours addon. */
export const wandererAdminApi = {
get: (): Promise<AdminFeatureToggleResponse> => apiClient.get('/admin/tours-wanderer').then((r) => r.data),
update: (enabled: boolean): Promise<AdminFeatureToggleResponse> =>
apiClient.put('/admin/tours-wanderer', { enabled }).then((r) => r.data),
};