feat: Adds the ability to create a new article (#5255)
This commit is contained in:
@@ -32,6 +32,16 @@ class ArticlesAPI extends PortalsAPI {
|
||||
articleObj
|
||||
);
|
||||
}
|
||||
|
||||
createArticle({ portalSlug, articleObj }) {
|
||||
const { content, title, author_id, category_id } = articleObj;
|
||||
return axios.post(`${this.url}/${portalSlug}/articles`, {
|
||||
content,
|
||||
title,
|
||||
author_id,
|
||||
category_id,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new ArticlesAPI();
|
||||
|
||||
Reference in New Issue
Block a user