diff --git a/src/ts/@overflow/app/config/index.ts b/src/ts/@overflow/app/config/index.ts index 574b167..ec63898 100644 --- a/src/ts/@overflow/app/config/index.ts +++ b/src/ts/@overflow/app/config/index.ts @@ -12,7 +12,8 @@ import readNoAuthProbeReducer from '@overflow/noauthprobe/redux/reducer/read_all import readAllTargetByProbeReducer from '@overflow/target/redux/reducer/readAllByProbe'; import readTargetReducer from '@overflow/target/redux/reducer/read'; -import readAllByTargetReducer from '@overflow/sensor/redux/reducer/read_all_by_target'; +import sensorReadAllByTargetReducer from '@overflow/sensor/redux/reducer/read_all_by_target'; +import sensorReadAllByDomainReducer from '@overflow/sensor/redux/reducer/read_all_by_domain'; import SensorReadReducer from '@overflow/sensor/redux/reducer/read'; import SensorItemReadAllBySensorReducer from '@overflow/sensor/redux/reducer/item_read_all_by_sensor'; @@ -59,7 +60,8 @@ const reduxConfig: ReduxConfig = { signInReducer, readAllProbeReducer, readProbeReducer, - readAllByTargetReducer, + sensorReadAllByTargetReducer, + sensorReadAllByDomainReducer, SensorReadReducer, signUpReducer, SensorItemReadAllBySensorReducer, diff --git a/src/ts/@overflow/sensor/redux/reducer/read_all_by_domain.ts b/src/ts/@overflow/sensor/redux/reducer/read_all_by_domain.ts index 1f78f1f..dd1c715 100644 --- a/src/ts/@overflow/sensor/redux/reducer/read_all_by_domain.ts +++ b/src/ts/@overflow/sensor/redux/reducer/read_all_by_domain.ts @@ -1,19 +1,22 @@ import Action from '@overflow/commons/redux/Action'; import { ReducersMapObject } from 'redux'; -import Target from '@overflow/target/api/model/Target'; +import Sensor from '@overflow/sensor/api/model/Sensor'; import * as ReadAllByDomainActionTypes from '../action/read_all_by_domain'; -import ReadAllByTargetDomain, { defaultState as readAllByDomainDefaultState } from '../state/ReadAllByDomain'; +import ReadAllByDomain, { defaultState as readAllByDomainDefaultState } from '../state/ReadAllByDomain'; const reducer: ReducersMapObject = { [ReadAllByDomainActionTypes.REQUEST_SUCCESS]: - (state: ReadAllByTargetDomain = readAllByDomainDefaultState, action: Action): - ReadAllByTargetDomain => { - return state; + (state: ReadAllByDomain = readAllByDomainDefaultState, action: Action): + ReadAllByDomain => { + return { + ...state, + SensorList:action.payload, + }; }, [ReadAllByDomainActionTypes.REQUEST_FAILURE]: - (state: ReadAllByTargetDomain = readAllByDomainDefaultState, action: Action): - ReadAllByTargetDomain => { + (state: ReadAllByDomain = readAllByDomainDefaultState, action: Action): + ReadAllByDomain => { return state; }, };