import api from "@/lib/api"; import type { Report, ReportStatus } from "./report.service"; export interface AdminStats { users: number; contents: number; categories: number; } export const adminService = { getStats: async (): Promise => { const response = await api.get("/admin/stats"); return response.data; }, getReports: async (limit = 10, offset = 0): Promise => { const response = await api.get("/reports", { params: { limit, offset } }); return response.data; }, updateReportStatus: async ( reportId: string, status: ReportStatus, ): Promise => { await api.patch(`/reports/${reportId}/status`, { status }); }, deleteUser: async (userId: string): Promise => { await api.delete(`/users/${userId}`); }, updateUser: async (userId: string, data: any): Promise => { await api.patch(`/users/admin/${userId}`, data); }, };