1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-16 00:00:03 +01:00

add a TODO in separate case for downloaded files (WIP)

This commit is contained in:
Sonja Happ 2020-03-13 17:20:23 +01:00
parent fe79f5e531
commit 6cac1df08b

View file

@ -40,6 +40,14 @@ class FileStore extends ArrayStore {
case 'files/upload-error':
console.log(action.error);
return state;
case 'files/loaded':
if (Array.isArray(action.data)) {
return super.reduce(state, action)
} else {
// in this case a file is contained in the response (no JSON)
// TODO we have to extract and process the file here (=save it somewhere?)
return super.reduce(state, action)
}
default:
return super.reduce(state, action);