feat: Adds the ability to create a new article (#5255)
This commit is contained in:
parent
45d0d101b1
commit
0cd08065d1
9 changed files with 117 additions and 36 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue