From 8a49e1eedebb6d4c47edf6fd1a7545ea502d59e7 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Sat, 19 Aug 2017 19:03:16 +0200 Subject: Generalize denormalization of object resources --- src/reducers/objects.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/reducers/objects.js') 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( -- cgit v1.2.3