chore: update TypeScript build info cache

This commit is contained in:
2025-09-19 12:52:02 -04:00
parent d6da699c54
commit 9c03f5f5fe
6 changed files with 165 additions and 59 deletions
@@ -158,9 +158,20 @@ export class PlaylistsComponent {
if (!pl?.id || !user?.id || pl.userId !== user.id) return;
const ok = confirm(`Supprimer la playlist "${pl.title}" ?`);
if (!ok) return;
this.http.delete(`${this.apiBase()}/playlists/${encodeURIComponent(pl.id)}`, { withCredentials: true }).subscribe({
next: () => this.reload(this.searchQuery().trim() || undefined),
error: (err) => this.error.set(err?.error?.error || err?.message || 'Échec de la suppression')
this.http.delete(`${this.apiBase()}/playlists/${encodeURIComponent(pl.id)}`, {
withCredentials: true,
responseType: 'text' // Handle empty response
}).subscribe({
next: () => {
// Remove the playlist from the local list immediately for better UX
this.playlists.set(this.playlists().filter(p => p.id !== pl.id));
},
error: (err) => {
this.error.set(err?.error?.error || err?.message || 'Échec de la suppression');
// Reload to ensure consistency with the server
this.reload(this.searchQuery().trim() || undefined);
}
});
}
}