refactor(media): unify frontend media identity

This commit is contained in:
jxxghp
2026-08-12 18:32:29 +08:00
parent 1355e3460e
commit 4fce4cd171
89 changed files with 1856 additions and 1087 deletions
+1 -2
View File
@@ -31,8 +31,7 @@ export function mediaDetailsHandler(
status = 200,
onRequest: (url: URL) => void = () => {},
) {
const normalizedMediaId = typeof mediaId === 'number' ? `tmdb:${mediaId}` : mediaId
return http.get(mediaApiUrls.details(normalizedMediaId), ({ request }) => {
return http.get(mediaApiUrls.details(String(mediaId)), ({ request }) => {
onRequest(new URL(request.url))
return HttpResponse.json(response as unknown as JsonBodyType, { status })
})