feat(admin): implement admin statistics API and service

Add admin statistics endpoint to provide user, content, and category stats. Introduce `AdminModule` with controller, service, and repository integration for data aggregation. Include frontend service to consume the stats API.
This commit is contained in:
Mathis HERRIOT
2026-01-14 21:44:14 +01:00
parent 47d6fcb6a0
commit 6ce58d1639
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { api } from "./api";
export interface AdminStats {
users: number;
contents: number;
categories: number;
}
export const adminService = {
getStats: async (): Promise<AdminStats> => {
const response = await api.get("/admin/stats");
return response.data;
},
};