Nightly: Badges für Sounds (auto /, plus Custom via Admin), Kategorien-UI erweitertet (anlegen/zuweisen)

This commit is contained in:
vibe-bot 2025-08-09 17:27:17 +02:00
parent 56351fd547
commit 8795657f69
4 changed files with 65 additions and 8 deletions

View file

@ -37,6 +37,15 @@ export async function assignCategories(files: string[], add: string[], remove: s
return res.json();
}
export async function assignBadges(files: string[], add: string[], remove: string[] = []) {
const res = await fetch(`${API_BASE}/badges/assign`, {
method: 'POST', headers: { 'Content-Type': 'application/json' }, credentials: 'include',
body: JSON.stringify({ files, add, remove })
});
if (!res.ok) throw new Error('Badges-Update fehlgeschlagen');
return res.json();
}
export async function fetchChannels(): Promise<VoiceChannelInfo[]> {
const res = await fetch(`${API_BASE}/channels`);
if (!res.ok) throw new Error('Fehler beim Laden der Channels');