Render unknown URLs inside the app shell and move ListeningStats to the domain types
CI/CD / BackEnd (push) Successful in 1m19s
CI/CD / WebPlayer (push) Successful in 46s
CI/CD / Deploy (push) Skipped

Add catch-all routes so unknown pages 404 inside the (app) layout and unknown
/api URLs return a JSON 404 instead of redirecting to the login page. Restore
the full root error page.
This commit is contained in:
2026-09-24 14:29:45 +02:00
parent 2d23eb87c6
commit 8e85af2b3b
6 changed files with 28 additions and 12 deletions
+1 -7
View File
@@ -1,5 +1,5 @@
import type { components } from '$lib/api/schema';
import type { Album, LikedTrack, Mix, Paged, Playlist, Track } from '$lib/types';
import type { Album, LikedTrack, ListeningStats, Mix, Paged, Playlist, Track } from '$lib/types';
type TrackDto = components['schemas']['TrackApplicationResponse'];
type AlbumDto = components['schemas']['AlbumApplicationResponse'];
@@ -84,12 +84,6 @@ export function toPlaylist(dto: PlaylistDto): Playlist {
type ListeningStatsDto = components['schemas']['ListeningStatsResponse'];
export interface ListeningStats {
tracksThisWeek: number;
secondsThisWeek: number;
streakDays: number;
}
export function toCount(value: number | string | null | undefined): number {
return Number(value ?? 0) || 0;
}