WIP. A little custom music server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: validate track number being 0-200

+4 -1
+4 -1
backend/src/types.ts
··· 41 41 return isValid(id as string) ? true : `Extpected SongID to end with valid ulid but recieved (${id})`; 42 42 }), 43 43 ); 44 + 45 + const TrackNumber = Schema.Int.pipe(Schema.between(0, 200), Schema.NullOr); 46 + 44 47 const Song = Schema.Struct({ 45 48 id: SongId, 46 49 title: Schema.NonEmptyString, 47 50 // TODO: this can only positive non zero int 48 - trackNumber: Schema.NullOr(Schema.Int), 51 + trackNumber: TrackNumber, 49 52 fileId: AudioFileId, 50 53 }).annotations({ 51 54 title: "songs",