fixed action type

This commit is contained in:
snoop
2017-07-04 18:01:47 +09:00
parent 4d96fb8d44
commit 8516654511
19 changed files with 110 additions and 110 deletions

View File

@@ -8,16 +8,16 @@ export class NoAuthProbeService extends Service {
super('NoAuthProbeService');
}
public regist(noAuthProbe: NoAuthProbe): void {
public regist(noAuthProbe: NoAuthProbe): NoAuthProbe {
return null;
}
// Todo List<NoAuthProbe>
public readAllByDomain(domain: Domain): Promise<NoAuthProbe> {
public readAllByDomain(domain: Domain): NoAuthProbe[] {
return null;
}
public read(id: number): Promise<NoAuthProbe> {
public read(id: number): NoAuthProbe {
return null;
}
}

View File

@@ -5,17 +5,17 @@ import Domain from '@overflow/domain/api/model/Domain';
import ReadAllByDomainPayload from '../payload/ReadAllByDomainPayload';
// Action Type
export type REQUEST = '@overflow/noAuthProbe/readAllByDomain/REQUEST';
export type REQUEST_SUCCESS = '@overflow/noAuthProbe/readAllByDomain/REQUEST_SUCCESS';
export type REQUEST_FAILURE = '@overflow/noAuthProbe/readAllByDomain/REQUEST_FAILURE';
export type REQUEST = '@overflow/noAuthProbe/read_all_by_domain/REQUEST';
export type REQUEST_SUCCESS = '@overflow/noAuthProbe/read_all_by_domain/REQUEST_SUCCESS';
export type REQUEST_FAILURE = '@overflow/noAuthProbe/read_all_by_domain/REQUEST_FAILURE';
export const REQUEST: REQUEST = '@overflow/noAuthProbe/readAllByDomain/REQUEST';
export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/noAuthProbe/readAllByDomain/REQUEST_SUCCESS';
export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/noAuthProbe/readAllByDomain/REQUEST_FAILURE';
export const REQUEST: REQUEST = '@overflow/noAuthProbe/read_all_by_domain/REQUEST';
export const REQUEST_SUCCESS: REQUEST_SUCCESS = '@overflow/noAuthProbe/read_all_by_domain/REQUEST_SUCCESS';
export const REQUEST_FAILURE: REQUEST_FAILURE = '@overflow/noAuthProbe/read_all_by_domain/REQUEST_FAILURE';
// Action Creater
export type request = (domain: Domain) => Action<ReadAllByDomainPayload>;
export type requestSuccess = (noAuthProbe: NoAuthProbe) => Action<NoAuthProbe>;
export type requestSuccess = (noAuthProbeList: NoAuthProbe[]) => Action<NoAuthProbe[]>;
export type requestFailure = (error: Error) => Action;
@@ -29,10 +29,10 @@ export const request: request = (domain: Domain): Action<ReadAllByDomainPayload>
};
};
export const requestSuccess: requestSuccess = (noAuthProbe: NoAuthProbe): Action<NoAuthProbe> => {
export const requestSuccess: requestSuccess = (noAuthProbeList: NoAuthProbe[]): Action<NoAuthProbe[]> => {
return {
type: REQUEST_SUCCESS,
payload: noAuthProbe,
payload: noAuthProbeList,
};
};

View File

@@ -18,12 +18,12 @@ function* readAllByDomain(action: Action<ReadAllByDomainPayload>): SagaIterator
// payload: {sendingRequest: true},
// });
const retApikey = yield call(AppContext.getService<NoAuthProbeService>().readAllByDomain, domain);
const noauthProbeList = yield call(AppContext.getService<NoAuthProbeService>().readAllByDomain, domain);
// if (responseBody.token === undefined) {
// throw new Error(MESSAGES.UNABLE_TO_FIND_TOKEN_IN_LOGIN_RESPONSE);
// }
yield put(ReadActions.requestSuccess(retApikey));
yield put(ReadActions.requestSuccess(noauthProbeList));
} catch (e) {
yield put(ReadActions.requestFailure(e));
} finally {