From ed49b5ecdf3568ec1b9f2da7ab5c808aad80d7ca Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 4 Jul 2017 18:26:48 +0900 Subject: [PATCH] s --- .../redux/saga/regist_discovered_target.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ts/@overflow/target/redux/saga/regist_discovered_target.ts b/src/ts/@overflow/target/redux/saga/regist_discovered_target.ts index 6970d8d..0e050cd 100644 --- a/src/ts/@overflow/target/redux/saga/regist_discovered_target.ts +++ b/src/ts/@overflow/target/redux/saga/regist_discovered_target.ts @@ -5,26 +5,26 @@ import AppContext from '@overflow/commons/context'; import Action from '@overflow/commons/redux/Action'; import Target from '../../api/model/Target'; -import TargetService from '../../api/service/TargetService'; -import * as RegistActions from '../action/regist'; -import RegistPayload from '../payload/RegistPayload'; +import TargetDiscoveryService from '../../api/service/TargetDiscoveryService'; +import * as RegistDiscoveredTargetActions from '../action/regist_discovered_target'; +import RegistDiscoveredTargetPayload from '../payload/RegistDiscoveredTargetPayload'; -function* registDiscoveredTarget(action: Action): SagaIterator { +function* registDiscoveredTarget(action: Action): SagaIterator { try { - const {target} = action.payload; + const {hosts, probe} = action.payload; // yield put({ // type: types.SENDING_REQUEST, // payload: {sendingRequest: true}, // }); - const retTarget = yield call(AppContext.getService().regist, target); + yield call(AppContext.getService().saveAllTarget, hosts, probe); // if (responseBody.token === undefined) { // throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE); // } - yield put(RegistActions.requestSuccess(retTarget)); + yield put(RegistDiscoveredTargetActions.requestSuccess()); } catch (e) { - yield put(RegistActions.requestFailure(e)); + yield put(RegistDiscoveredTargetActions.requestFailure(e)); } finally { // yield put({ // type: types.SENDING_REQUEST, @@ -33,6 +33,6 @@ function* registDiscoveredTarget(action: Action): SagaIterator { } } -export function* watchRegist(): SagaIterator { - yield takeLatest(RegistActions.REQUEST, regist); +export function* watchRegistDiscoveredTarget(): SagaIterator { + yield takeLatest(RegistDiscoveredTargetActions.REQUEST, registDiscoveredTarget); }