feat: added cors for web-player-backend

This commit is contained in:
Boris Cherepanov
2026-03-23 12:34:27 +03:00
parent f26135ca25
commit 310f0061d3
10 changed files with 323 additions and 39 deletions
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react'
import { API_ROOT } from '../furumiApi'
import type { QueueItem } from './QueueList'
function Cover({ src }: { src: string }) {
@@ -12,7 +13,7 @@ function Cover({ src }: { src: string }) {
return <img src={src} alt="" onError={() => setErrored(true)} />
}
export function NowPlaying({ apiRoot, track }: { apiRoot: string; track: QueueItem | null }) {
export function NowPlaying({ track }: { track: QueueItem | null }) {
if (!track) {
return (
<div className="np-info">
@@ -31,7 +32,7 @@ export function NowPlaying({ apiRoot, track }: { apiRoot: string; track: QueueIt
)
}
const coverUrl = `${apiRoot}/tracks/${track.slug}/cover`
const coverUrl = `${API_ROOT}/tracks/${track.slug}/cover`
return (
<div className="np-info">