Add original name support for shows: implement API endpoint to set original name, update Show and ShowDto models to include original name field, and enhance UI components for managing original names in show metadata. Update validation and database schema accordingly.

This commit is contained in:
Leonid Pershin
2026-07-25 11:10:33 +03:00
parent 84c2867062
commit 72451f89a8
18 changed files with 1052 additions and 7 deletions
+13 -1
View File
@@ -15,10 +15,22 @@ export function getShow(id: string) {
return apiRequest<ShowDto>(`/admin/shows/${id}`)
}
export function createShow(body: { name: string; kind: ShowKind; description?: string }) {
export function createShow(body: {
name: string
kind: ShowKind
description?: string
originalName?: string
}) {
return apiRequest<CreatedIdResponse>('/admin/shows', { method: 'POST', body })
}
export function setShowOriginalName(id: string, originalName: string | null) {
return apiRequest<void>(`/admin/shows/${id}/original-name`, {
method: 'PUT',
body: { originalName },
})
}
export function deleteShow(id: string) {
return apiRequest<void>(`/admin/shows/${id}`, { method: 'DELETE' })
}