feat(users, contents): extend admin update functionality and role management
- Added `moderator` role to `User` type for improved role assignment flexibility. - Introduced `updateAdmin` method in user and content services to handle partial admin-specific updates. - Enhanced `Content` type with `categoryId` and `iconUrl` to support richer categorization.
This commit is contained in:
@@ -65,4 +65,9 @@ export const ContentService = {
|
||||
async removeAdmin(id: string): Promise<void> {
|
||||
await api.delete(`/contents/${id}/admin`);
|
||||
},
|
||||
|
||||
async updateAdmin(id: string, update: Partial<Content>): Promise<Content> {
|
||||
const { data } = await api.patch<Content>(`/contents/${id}/admin`, update);
|
||||
return data;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user