Client - handle activity 'uuid' instead of 'id' - fix #57

This commit is contained in:
Sam
2020-12-30 19:53:59 +01:00
parent 3af845f18c
commit 3c6bc54c79
8 changed files with 9 additions and 9 deletions

View File

@ -27,7 +27,7 @@
"redux-thunk": "^2.3.0"
},
"scripts": {
"start": "react-scripts start",
"start": "PORT=$CLIENT_PORT react-scripts start",
"build": "NODE_ENV=production react-scripts build && rm -rf ../fittrackee/dist/* && cp -a build/. ../fittrackee/dist",
"eject": "react-scripts eject",
"lint": "node_modules/.bin/eslint --cache --ext .jsx --ext .js src",

View File

@ -47,7 +47,7 @@ export const getOrUpdateData = (
canDispatch = true
) => dispatch => {
dispatch(setLoading(true))
if (data && data.id && isNaN(data.id)) {
if (data && data.id && target !== 'activities' && isNaN(data.id)) {
dispatch(setLoading(false))
return dispatch(setError(`${target}|Incorrect id`))
}