return dispatch => turbo({site_id:APP_ID}).login(credentials) .then(data => { if (actionType != null){ dispatch({ type: actionType, data: data }) } return data }) .catch(err => { throw err })
return dispatch => turbo({site_id:APP_ID}).remove(resource, entity) .then(data => { if (actionType != null){ dispatch({ type: actionType, data: data }) } return data }) .catch(err => { throw err })
return dispatch => turbo({site_id:APP_ID}).currentUser() .then(data => { if (actionType != null){ dispatch({ type: actionType, data: data }) } return data }) .catch(err => { throw err })
return dispatch => turbo({site_id:APP_ID}).fetch(resource, params) .then(data => { if (actionType != null){ dispatch({ type: actionType, params: params, // can be null data: data }) } return data }) .catch(err => { throw err })
const uploadFile = (file) => { return turbo({site_id:APP_ID}).uploadFile(file) // returns a Promise }