feat: добавил эндпоинт для получения статистики админского дашборда
Backend CI / build-and-test (push) Successful in 40s
Frontend CI / build-and-check (push) Failing after 19s
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Successful in 6s
🚀 Create and publish a Docker image / Build & publish backend image (push) Successful in 24s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Successful in 27s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Successful in 5s

This commit is contained in:
2026-05-28 05:09:47 +03:00
parent e8f7a64d15
commit a8d51df3f1
8 changed files with 123 additions and 23 deletions
+2
View File
@@ -18,6 +18,7 @@ import type {
TagDto,
UpdateReviewPromptRequest,
UserAchievementDto,
AdminDashboardStatsDto,
CurrentUserDto,
UserDto,
UserQuery,
@@ -68,6 +69,7 @@ export const usersApi = {
body: JSON.stringify(payload),
}),
myStats: () => apiRequest<UserStatsDto>('/users/me/stats'),
adminStats: () => apiRequest<AdminDashboardStatsDto>('/users/admin/stats'),
async myEnrollments() {
const payload = await apiRequest<PagedResult<LectureDto> | LectureDto[] | undefined>(
'/users/me/enrollments',
+7
View File
@@ -76,6 +76,13 @@ export interface UserStatsDto {
enrollmentSlotRules: EnrollmentSlotRuleDto[]
}
export interface AdminDashboardStatsDto {
usersCount: number
lecturesCount: number
enrollmentsCount: number
pendingReviewsCount: number
}
export interface EnrollmentSlotRuleDto {
level: number
slots: number