Refactored Data Services

This commit is contained in:
Art Lowel
2017-02-22 12:03:22 +01:00
parent 9364c32ae2
commit bb5575cd27
18 changed files with 215 additions and 201 deletions

17
src/app/core/cache/cache.reducers.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
import { combineReducers } from "@ngrx/store";
import { RequestCacheState, requestCacheReducer } from "./request-cache.reducer";
import { ObjectCacheState, objectCacheReducer } from "./object-cache.reducer";
export interface CacheState {
request: RequestCacheState,
object: ObjectCacheState
}
export const reducers = {
request: requestCacheReducer,
object: objectCacheReducer
};
export function cacheReducer(state: any, action: any) {
return combineReducers(reducers)(state, action);
}