Update scheduling parameters and refactor channel endpoints: extend HorizonDays to 7 and RetentionDays to 90 in appsettings.json. Consolidate channel-related endpoint logic by removing obsolete files and enhancing the ShowEndpoints with audience and genre management capabilities. Improve error handling and streamline command handlers for channel operations.
build / backend (push) Successful in 7m40s
build / frontend (push) Failing after 39s
tests / backend-tests (push) Successful in 6m9s

This commit is contained in:
Leonid Pershin
2026-07-26 13:32:13 +03:00
parent c4ef954dea
commit 66040a8841
272 changed files with 27944 additions and 8699 deletions
+11 -2
View File
@@ -9,8 +9,9 @@ import type {
ShowSummaryDto,
} from '@/shared/api/types'
export function listShows() {
return apiRequest<ShowSummaryDto[]>('/admin/shows')
export function listShows(genreId?: string) {
const query = genreId ? `?${new URLSearchParams({ genreId }).toString()}` : ''
return apiRequest<ShowSummaryDto[]>(`/admin/shows${query}`)
}
export function getShow(id: string) {
@@ -31,6 +32,14 @@ export function setShowAudience(id: string, audience: ShowAudience) {
return apiRequest<void>(`/admin/shows/${id}/audience`, { method: 'PUT', body: { audience } })
}
/** Полностью заменяет набор жанров шоу; основной — primaryGenreId (иначе первый в списке). */
export function setShowGenres(id: string, genreIds: string[], primaryGenreId: string | null) {
return apiRequest<void>(`/admin/shows/${id}/genres`, {
method: 'PUT',
body: { genreIds, primaryGenreId },
})
}
export function renameShow(id: string, name: string) {
return apiRequest<void>(`/admin/shows/${id}/name`, { method: 'PUT', body: { name } })
}