summaryrefslogtreecommitdiff
path: root/src/reducers/objects.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-08-19 19:03:16 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:43 +0200
commit8a49e1eedebb6d4c47edf6fd1a7545ea502d59e7 (patch)
tree7510e2520b1be46a2e40cc72eaa21284974cde10 /src/reducers/objects.js
parent19033b8460cb43dc2fa34a2cffa932b5efe111ca (diff)
Generalize denormalization of object resources
Diffstat (limited to 'src/reducers/objects.js')
-rw-r--r--src/reducers/objects.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/reducers/objects.js b/src/reducers/objects.js
index 40bd3524..6381c8d9 100644
--- a/src/reducers/objects.js
+++ b/src/reducers/objects.js
@@ -2,12 +2,12 @@ import {combineReducers} from "redux";
import {ADD_TO_AUTHORIZATION_STORE, ADD_TO_SIMULATION_STORE, ADD_TO_USER_STORE} from "../actions/objects";
export const objects = combineReducers({
- simulations,
- authorizations,
- users,
+ simulation,
+ authorization,
+ user,
});
-function simulations(state = {}, action) {
+function simulation(state = {}, action) {
switch (action.type) {
case ADD_TO_SIMULATION_STORE:
return Object.assign(
@@ -19,7 +19,7 @@ function simulations(state = {}, action) {
}
}
-function authorizations(state = {}, action) {
+function authorization(state = {}, action) {
switch (action.type) {
case ADD_TO_AUTHORIZATION_STORE:
return Object.assign(
@@ -31,7 +31,7 @@ function authorizations(state = {}, action) {
}
}
-function users(state = {}, action) {
+function user(state = {}, action) {
switch (action.type) {
case ADD_TO_USER_STORE:
return Object.assign(