Changeset f6ed6e4 for petify-frontend/src/api/profile.ts
- Timestamp:
- 08/22/26 19:00:38 (8 hours ago)
- Branches:
- master
- Parents:
- ae83647
- File:
-
- 1 edited
-
petify-frontend/src/api/profile.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
petify-frontend/src/api/profile.ts
rae83647 rf6ed6e4 35 35 city: string 36 36 address: string 37 workDays?: string 38 startTime?: string 39 endTime?: string 40 scheduleComplete?: boolean 37 41 } 38 42 … … 464 468 } 465 469 470 export async function updateMyClinicSchedule( 471 userId: number, 472 data: { 473 workDays: string 474 startTime: string 475 endTime: string 476 } 477 ): Promise<VetClinic> { 478 const url = joinUrl(getBaseUrl(), `/api/clinics/my/schedule`) 479 const response = await fetch(url, { 480 method: 'PUT', 481 headers: { 482 'Content-Type': 'application/json', 483 'X-User-Id': String(userId), 484 }, 485 body: JSON.stringify(data), 486 }) 487 488 if (!response.ok) { 489 const error = await response.json() 490 throw new Error(error.error || `Failed to update clinic schedule: ${response.statusText}`) 491 } 492 493 return await response.json() 494 } 495 466 496 export async function getClinicAvailableSlots(clinicId: number, date: string): Promise<AppointmentSlot[]> { 467 497 const url = joinUrl(getBaseUrl(), `/api/appointments/clinics/${clinicId}/available-slots?date=${encodeURIComponent(date)}`)
Note:
See TracChangeset
for help on using the changeset viewer.
