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:
Mathis HERRIOT
2026-01-21 13:22:07 +01:00
parent 68b5071f6d
commit 764c4c07c8
5 changed files with 21 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ export interface Content {
favoritesCount: number;
isLiked?: boolean;
tags: (string | Tag)[];
categoryId?: string | null;
category?: Category;
authorId: string;
author: User;
@@ -36,6 +37,7 @@ export interface Category {
name: string;
slug: string;
description?: string;
iconUrl?: string;
}
export interface PaginatedResponse<T> {

View File

@@ -6,7 +6,7 @@ export interface User {
displayName?: string;
avatarUrl?: string;
bio?: string;
role?: "user" | "admin";
role?: "user" | "admin" | "moderator";
status?: "active" | "verification" | "suspended" | "pending" | "deleted";
createdAt: string;
}