feat: Adds the ability to edit/delete category (#5385)

This commit is contained in:
Sivin Varghese
2022-09-02 22:34:07 +05:30
committed by GitHub
parent a9801a3c76
commit d47a0ae461
17 changed files with 667 additions and 37 deletions

View File

@@ -15,8 +15,11 @@ class CategoriesAPI extends PortalsAPI {
return axios.post(`${this.url}/${portalSlug}/categories`, categoryObj);
}
update({ portalSlug, categoryObj }) {
return axios.patch(`${this.url}/${portalSlug}/categories`, categoryObj);
update({ portalSlug, categoryId, categoryObj }) {
return axios.patch(
`${this.url}/${portalSlug}/categories/${categoryId}`,
categoryObj
);
}
delete({ portalSlug, categoryId }) {