fix(api): update policies type and materialisation endpoint URL
continuous-integration/drone/push Build is passing Details

Per Backend Brooke messages:
- Made BookingDetail.policies required (commit 75c8edf deployed)
- Fixed materialisation endpoint: /materialisation-trigger → /slot-materialize
- CORS headers fix deploying on backend (X-Idempotency-Key, If-Match, If-None-Match)

Artifacts: src/types/bookings.ts:69-73, src/lib/api/materialisation.ts:91
master
Guillermo Pages 1 month ago
parent 9186b35649
commit 20971e53c0

@ -88,7 +88,7 @@ export async function triggerMaterialisation(
} }
try { try {
const response = await fetch(`${API_BASE_URL}/admin/clubs/${clubId}/materialisation-trigger`, { const response = await fetch(`${API_BASE_URL}/admin/clubs/${clubId}/slot-materialize`, {
method: 'POST', method: 'POST',
credentials: 'include', credentials: 'include',
headers: { headers: {

@ -66,11 +66,10 @@ export interface BookingDetail {
updated_at: string; // ISO 8601 updated_at: string; // ISO 8601
provider?: ProviderInfo; provider?: ProviderInfo;
etag?: string; // from ETag response header etag?: string; // from ETag response header
// Optional policy fields (if backend adds them) policies: {
policies?: { cancel_grace_minutes: number; // default: 15
cancel_grace_minutes?: number; cancel_grace_anchor: 'start' | 'end'; // current: 'start'
cancel_grace_anchor?: 'start' | 'end'; move_window_days: number; // default: 14, 0 = no limit
move_window_days?: number;
}; };
} }

Loading…
Cancel
Save