mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 12:37:56 +00:00
feat: Adds the ability to edit article (#5232)
This commit is contained in:
@@ -21,6 +21,17 @@ class ArticlesAPI extends PortalsAPI {
|
||||
if (category_slug) baseUrl += `&category_slug=${category_slug}`;
|
||||
return axios.get(baseUrl);
|
||||
}
|
||||
|
||||
getArticle({ id, portalSlug }) {
|
||||
return axios.get(`${this.url}/${portalSlug}/articles/${id}`);
|
||||
}
|
||||
|
||||
updateArticle({ portalSlug, articleId, articleObj }) {
|
||||
return axios.patch(
|
||||
`${this.url}/${portalSlug}/articles/${articleId}`,
|
||||
articleObj
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default new ArticlesAPI();
|
||||
|
||||
Reference in New Issue
Block a user