Merge branch 'feat/contacts-redesign' into feat/compose-new-conversation

This commit is contained in:
Sivin Varghese
2024-11-22 10:30:45 +05:30
committed by GitHub
9 changed files with 53 additions and 192 deletions
@@ -69,6 +69,25 @@ export const actions = {
}
},
updateAsync: async ({ commit }, { portalSlug, articleId, ...articleObj }) => {
commit(types.UPDATE_ARTICLE_FLAG, {
uiFlags: { isUpdating: true },
articleId,
});
try {
await articlesAPI.updateArticle({ portalSlug, articleId, articleObj });
return articleId;
} catch (error) {
return throwErrorMessage(error);
} finally {
commit(types.UPDATE_ARTICLE_FLAG, {
uiFlags: { isUpdating: false },
articleId,
});
}
},
update: async ({ commit }, { portalSlug, articleId, ...articleObj }) => {
commit(types.UPDATE_ARTICLE_FLAG, {
uiFlags: {