From 8d0737cc8ed89a12af55a00b3202b0831011621b Mon Sep 17 00:00:00 2001 From: JANGHYUNn Date: Tue, 24 Oct 2023 17:36:04 +0900 Subject: [PATCH] =?UTF-8?q?faq,=20qna=20=EC=82=AD=EC=A0=9C=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20=EB=A9=94=EC=84=B8=EC=A7=80=20=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/cstmrService/faq/sagas/index.ts | 10 ++++++++++ src/modules/cstmrService/inquiry/sagas/index.ts | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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 }) );