u
This commit is contained in:
@@ -332,6 +332,19 @@ export const category = {
|
||||
delete(categoryId) {
|
||||
return http(`/api/category/${categoryId}`, { method: 'DELETE' });
|
||||
},
|
||||
|
||||
/**
|
||||
* PATCH /api/category/:id
|
||||
* Body: { name } — renames and re-slugifies in the company default language.
|
||||
* Empty name → 400 name is required.
|
||||
* → 200 { category: { id, name, slug } }
|
||||
*/
|
||||
updateName(categoryId, name) {
|
||||
return http(`/api/category/${categoryId}`, {
|
||||
method: 'PATCH',
|
||||
body: { name },
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user