Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
edwindelbosque committed Oct 17, 2019
2 parents 99a36aa + a074fb9 commit 3d48f7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/apiCalls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const getReservations = () => {
return fetch('http://localhost:3001/api/v1/reservations')
.then(response => response.json())
.then(reservations => reservations)
.catch(error => console.warning(error))
}

export const postReservation = (reservation) => {
Expand All @@ -15,6 +16,7 @@ export const postReservation = (reservation) => {
})
.then(response => response.json())
.then(reservation => reservation)
.catch(error => console.warning(error))
}

export const deleteReservation = (id) => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class App extends Component {
.then(reservations => this.setState({
reservations: reservations
}))
.catch(error => console.warning(error))
}

makeReservation = (information) => {
Expand All @@ -25,7 +26,7 @@ class App extends Component {
getReservations()
.then(reservations => this.setState({
reservations: reservations
}))
})).catch(error => console.warning(error))
}, 50)
}

Expand All @@ -35,7 +36,7 @@ class App extends Component {
getReservations()
.then(reservations => this.setState({
reservations: reservations
}))
})).catch(error => console.warning(error))
}, 50)
}

Expand Down

0 comments on commit 3d48f7a

Please sign in to comment.