mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 15:07:13 +01:00
rename api end url to bookings
This commit is contained in:
@@ -17,21 +17,21 @@ export function getBookingStatus(status: BOOKING_STATUS) {
|
||||
}
|
||||
|
||||
export async function createBooking(formData: object) {
|
||||
return fetch('/api/booking', {
|
||||
return fetch('/api/bookings', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
})
|
||||
}
|
||||
|
||||
export async function cancelBooking(uuid: string) {
|
||||
return fetch(`/api/booking/${uuid}`, {
|
||||
return fetch(`/api/bookings/${uuid}`, {
|
||||
method: 'PATCH',
|
||||
body: { status: BOOKING_STATUS.CANCELED },
|
||||
})
|
||||
}
|
||||
|
||||
export async function patchBooking(uuid: string, bookingData: object) {
|
||||
return fetch(`/api/booking/${uuid}`, {
|
||||
return fetch(`/api/bookings/${uuid}`, {
|
||||
method: 'PATCH',
|
||||
body: { ...bookingData },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user