File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ export const createSongPayload = (song: z.infer<typeof SongAPIResponseModel>): z
7
7
id : song . id ,
8
8
name : song . title ,
9
9
type : song . type ,
10
- year : song ? .year || null ,
10
+ year : song . year || null ,
11
11
releaseDate : song . more_info ?. release_date || null ,
12
12
duration : song . more_info ?. duration ? Number ( song . more_info ?. duration ) : null ,
13
13
label : song . more_info ?. label || null ,
14
14
explicitContent : song . explicit_content === '1' ,
15
- playCount : Number ( song . play_count || 0 ) ,
15
+ playCount : song . play_count ? Number ( song . play_count ) : null ,
16
16
language : song . language ,
17
17
hasLyrics : song . more_info ?. has_lyrics === 'true' ,
18
18
lyricsId : song . more_info ?. lyrics_id || null ,
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ export const SongModel = z.object({
66
66
duration : z . number ( ) . nullable ( ) ,
67
67
label : z . string ( ) . nullable ( ) ,
68
68
explicitContent : z . boolean ( ) ,
69
- playCount : z . number ( ) ,
69
+ playCount : z . number ( ) . nullable ( ) ,
70
70
language : z . string ( ) ,
71
71
hasLyrics : z . boolean ( ) ,
72
72
lyricsId : z . string ( ) . nullable ( ) ,
You can’t perform that action at this time.
0 commit comments