Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const requestSubmitBooking = () => (dispatch, getState) => {
- dispatch(requestSubmitBookingStart());
- return request.post('bookings', payload)
- .then(({ data }) => {
- dispatch(requestSubmitBookingSuccess({ bookingResult: data.booking }));
- })
- .catch(({ message }) => {
- dispatch(requestSubmitBookingFailure({ errorMessage: message }));
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement