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