From 4e583e1be7768fc8b84dcce75287f98df7346482 Mon Sep 17 00:00:00 2001 From: Pavel Meyer Date: Wed, 20 Nov 2024 16:11:58 +0300 Subject: [PATCH] Update createDiscussion.ts --- src/store/states/common/saga/createDiscussion.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/store/states/common/saga/createDiscussion.ts b/src/store/states/common/saga/createDiscussion.ts index 50d86da08b..d12a0da5ab 100644 --- a/src/store/states/common/saga/createDiscussion.ts +++ b/src/store/states/common/saga/createDiscussion.ts @@ -33,14 +33,21 @@ export function* createDiscussion( ); yield put(actions.setCommonAction(null)); - yield put(actions.createDiscussion.success(discussion)); + yield put( + actions.createDiscussion.success({ + discussion, + commonId: payload.commonId, + }), + ); if (payload.callback) { payload.callback(null, discussion); } } catch (error) { if (isError(error)) { - yield put(actions.createDiscussion.failure(error)); + yield put( + actions.createDiscussion.failure({ error, commonId: payload.commonId }), + ); if (payload.callback) { payload.callback(error);