diff --git a/server/src/index.ts b/server/src/index.ts index f11b806..90da983 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -37,9 +37,6 @@ const ALLOWED_GUILD_IDS = (process.env.ALLOWED_GUILD_IDS ?? '') .split(',') .map((s) => s.trim()) .filter(Boolean); -// Build/Version-Infos (zur Laufzeit verfügbar machen) -const BUILD_CHANNEL = String(process.env.VITE_BUILD_CHANNEL ?? process.env.BUILD_CHANNEL ?? 'stable'); -const APP_VERSION = String(process.env.VITE_APP_VERSION ?? process.env.APP_VERSION ?? '1.0.0'); if (!DISCORD_TOKEN) { console.error('Fehlende Umgebungsvariable DISCORD_TOKEN'); @@ -390,13 +387,7 @@ app.use(express.json()); app.use(cors()); app.get('/api/health', (_req: Request, res: Response) => { - res.json({ - ok: true, - totalPlays: persistedState.totalPlays ?? 0, - categories: (persistedState.categories ?? []).length, - version: APP_VERSION, - build: BUILD_CHANNEL - }); + res.json({ ok: true, totalPlays: persistedState.totalPlays ?? 0, categories: (persistedState.categories ?? []).length }); }); // --- Admin Auth --- diff --git a/web/src/App.tsx b/web/src/App.tsx index 4d067ec..b58ef7f 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -53,8 +53,6 @@ export default function App() { const [totalPlays, setTotalPlays] = useState(0); const [mediaUrl, setMediaUrl] = useState(''); const [chaosMode, setChaosMode] = useState(false); - const [serverVersion, setServerVersion] = useState(''); - const [serverBuild, setServerBuild] = useState(''); const chaosTimeoutRef = useRef(null); const chaosModeRef = useRef(false); useEffect(() => { chaosModeRef.current = chaosMode; }, [chaosMode]); @@ -83,11 +81,7 @@ export default function App() { try { const cats = await fetchCategories(); setCategories(cats.categories || []); } catch {} try { const h = await fetch('/api/health').then(r => r.json()).catch(() => null); - if (h) { - if (typeof h.totalPlays === 'number') setTotalPlays(h.totalPlays); - if (typeof h.version === 'string') setServerVersion(h.version); - if (typeof h.build === 'string') setServerBuild(h.build); - } + if (h && typeof h.totalPlays === 'number') setTotalPlays(h.totalPlays); } catch {} })(); }, []); @@ -334,9 +328,8 @@ export default function App() {

Jukebox 420 - {import.meta.env.VITE_BUILD_CHANNEL === 'nightly' && ( + {import.meta.env.VITE_BUILD_CHANNEL === 'nightly' && (
- v{serverVersion || import.meta.env.VITE_APP_VERSION || ''} • Nightly
)}