Fix: Add missing fetchSpecials() calls to update special song counts
This commit is contained in:
@@ -526,6 +526,7 @@ export default function AdminPage() {
|
|||||||
setIsUploading(false);
|
setIsUploading(false);
|
||||||
fetchSongs();
|
fetchSongs();
|
||||||
fetchGenres();
|
fetchGenres();
|
||||||
|
fetchSpecials(); // Update special counts
|
||||||
|
|
||||||
// Auto-trigger categorization after uploads
|
// Auto-trigger categorization after uploads
|
||||||
const successCount = results.filter(r => r.success).length;
|
const successCount = results.filter(r => r.success).length;
|
||||||
@@ -600,6 +601,7 @@ export default function AdminPage() {
|
|||||||
setUploadGenreIds([]);
|
setUploadGenreIds([]);
|
||||||
fetchSongs();
|
fetchSongs();
|
||||||
fetchGenres();
|
fetchGenres();
|
||||||
|
fetchSpecials(); // Update special counts if song was assigned to specials
|
||||||
setMessage(prev => prev + '\n✅ Genres assigned successfully!');
|
setMessage(prev => prev + '\n✅ Genres assigned successfully!');
|
||||||
} else {
|
} else {
|
||||||
alert('Failed to assign genres');
|
alert('Failed to assign genres');
|
||||||
@@ -642,6 +644,7 @@ export default function AdminPage() {
|
|||||||
setEditingId(null);
|
setEditingId(null);
|
||||||
fetchSongs();
|
fetchSongs();
|
||||||
fetchGenres();
|
fetchGenres();
|
||||||
|
fetchSpecials(); // Update special counts
|
||||||
} else {
|
} else {
|
||||||
alert('Failed to update song');
|
alert('Failed to update song');
|
||||||
}
|
}
|
||||||
@@ -661,6 +664,7 @@ export default function AdminPage() {
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
fetchSongs();
|
fetchSongs();
|
||||||
fetchGenres();
|
fetchGenres();
|
||||||
|
fetchSpecials(); // Update special counts
|
||||||
} else {
|
} else {
|
||||||
alert('Failed to delete song');
|
alert('Failed to delete song');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user