diff --git a/src/modules/cstmrService/faq/sagas/index.ts b/src/modules/cstmrService/faq/sagas/index.ts index e53f623..967e559 100644 --- a/src/modules/cstmrService/faq/sagas/index.ts +++ b/src/modules/cstmrService/faq/sagas/index.ts @@ -89,6 +89,7 @@ function* deleteSaga(action: ActionType) { try { const { faqSno, search } = action.payload; const res = yield call(Apis.faqAPI.delete, faqSno); + console.log(res.status); const { errorCode } = res; if (errorCode) { @@ -103,6 +104,15 @@ function* deleteSaga(action: ActionType) { ); return; + } else { + yield put( + MessageActions.IS_MESSAGE({ + messageCode: DELETE_MESSAGE.code, + message: DELETE_MESSAGE.message, + isHistoryBack: false, + isRefresh: false + }) + ); } yield put(Actions.LIST.request(search)); } catch (error) { diff --git a/src/modules/cstmrService/inquiry/sagas/index.ts b/src/modules/cstmrService/inquiry/sagas/index.ts index f98585c..793d1dc 100644 --- a/src/modules/cstmrService/inquiry/sagas/index.ts +++ b/src/modules/cstmrService/inquiry/sagas/index.ts @@ -125,7 +125,7 @@ function* adminDeleteSaga( try { const { category, anserStatus, createUserNm, qnaSno } = action.payload; const res = yield call(Apis.qnaAPI.adminDelete, qnaSno); - const { errorCode } = res; + const { errorCode, data } = res; if (errorCode) { // 오류메시지 호출 @@ -140,6 +140,16 @@ function* adminDeleteSaga( return; } + if (data) { + yield put( + MessageActions.IS_MESSAGE({ + messageCode: DELETE_MESSAGE.code, + message: DELETE_MESSAGE.message, + isHistoryBack: false, + isRefresh: false + }) + ); + } yield put( Actions.ADMIN_LIST.request({ category, anserStatus, createUserNm }) );