mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
feat: Add store to manage categories (#5127)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import portalAPI from 'dashboard/api/helpCenter/portals';
|
||||
import PortalAPI from 'dashboard/api/helpCenter/portals';
|
||||
import articlesAPI from 'dashboard/api/helpCenter/articles';
|
||||
import { throwErrorMessage } from 'dashboard/store/utils/api';
|
||||
const portalAPIs = new PortalAPI();
|
||||
import types from '../../mutation-types';
|
||||
export const actions = {
|
||||
index: async ({ commit }, { pageNumber, portalSlug, locale }) => {
|
||||
@@ -8,7 +9,7 @@ export const actions = {
|
||||
commit(types.SET_UI_FLAG, { isFetching: true });
|
||||
const {
|
||||
data: { payload, meta },
|
||||
} = await portalAPI.getArticles({
|
||||
} = await portalAPIs.getArticles({
|
||||
pageNumber,
|
||||
portalSlug,
|
||||
locale,
|
||||
@@ -44,7 +45,7 @@ export const actions = {
|
||||
show: async ({ commit }, { id, portalSlug }) => {
|
||||
commit(types.SET_UI_FLAG, { isFetching: true });
|
||||
try {
|
||||
const response = await portalAPI.getArticle({ id, portalSlug });
|
||||
const response = await articlesAPI.getArticle({ id, portalSlug });
|
||||
const {
|
||||
data: { payload },
|
||||
} = response;
|
||||
|
||||
Reference in New Issue
Block a user