descomentar fetch de registro

This commit is contained in:
Mariela 2022-08-26 13:44:00 -06:00
parent ac80892afb
commit 5a2f0846d8
1 changed files with 30 additions and 30 deletions

View File

@ -150,7 +150,7 @@ const Reservations = () => {
}
console.log(_reservation)
/* fetch('http://localhost:4000/reservation/createReservation/', {
fetch('http://localhost:4000/reservation/createReservation/', {
cache: 'no-cache',
method: 'POST',
body: JSON.stringify(_reservation),
@ -159,10 +159,10 @@ const Reservations = () => {
}
})
.then((response) => {
if (response.status !== 200 && response.status !== 201 )
if (response.status !== 200 && response.status !== 201)
console.log(`Hubo un error en el servicio: ${response.status}`)
else return response.json()
}).then(() => {*/
}).then(() => {
_reservations.push(_reservation);
setReservations(_reservations)
toast.current.show({
@ -173,7 +173,7 @@ const Reservations = () => {
});
setReservationDialog(false)
/*})*/
})