|
@@ -1,23 +1,25 @@
|
|
|
import * as types from "../actionTypes/actionTypes";
|
|
|
+const urlRegEvent = 'https://api-marathon.herokuapp.com/api/v1/eventUsers';
|
|
|
|
|
|
export const regEvent = payload => ({
|
|
|
- type: types.POST_REQUEST_CHECKIN,
|
|
|
+ type: types.POST_REGISTRATION_EVENT,
|
|
|
payload
|
|
|
});
|
|
|
|
|
|
export const regEventSuccess = payload => ({
|
|
|
- type: types.POST_REQUEST_SUCCESS_CHECKIN,
|
|
|
+ type: types.POST_REGISTRATION_EVENT_SUCCESS,
|
|
|
payload
|
|
|
});
|
|
|
|
|
|
export const regEventError = payload => ({
|
|
|
- type: types.POST_REQUEST_ERROR_CHECKIN,
|
|
|
+ type: types.POST_REGISTRATION_EVENT_ERROR,
|
|
|
payload
|
|
|
});
|
|
|
|
|
|
export const regEventSubmit = payload => {
|
|
|
+ console.log('post');
|
|
|
return dispatch => {
|
|
|
- let promise = fetch("https://api-marathon.herokuapp.com/api/v1/eventUsers",
|
|
|
+ let promise = fetch(urlRegEvent,
|
|
|
{
|
|
|
method: 'POST',
|
|
|
body: JSON.stringify(payload),
|