Devendra174's picture
Upload folder using huggingface_hub
f5071ca verified
raw
history blame contribute delete
665 Bytes
export const fetchBookings = () => {
return $.ajax({
method: "GET",
url: `/api/bookings`
});
}
export const fetchBooking = id => (
$.ajax({
method: 'Get',
url: `/api/bookings/${id}`
})
);
export const createBooking = booking => (
$.ajax({
method: 'Post',
url:`/api/bookings`,
data : { booking }
})
);
export const updateBooking = booking => (
$.ajax({
method: 'Patch',
url: `api/bookings/${booking.id}`,
data: { booking }
})
);
export const deleteBooking = id => (
$.ajax({
method: 'Delete',
url: `api/bookings/${id}`
})
);