Skip to content

Commit

Permalink
Update Song Type
Browse files Browse the repository at this point in the history
Co-authored-by: GregTCLTK <gregtcltk@gmail.com>
  • Loading branch information
Schlauer-Hax and GregTCLTK committed Apr 15, 2023
1 parent 932f1ee commit a1e3c84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/music.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ export const song = zod.object({
artists: artist.array().min(1),
primaryGenre: zod.string(),
secondaryGenre: zod.string(),
country: zod.string(),
year: zod.number(),
//TODO: no optional
country: zod.string().optional(),
language: zod.string().optional(),
explicit: zod.boolean(),
instrumental: zod.boolean().optional(),
file: zod.string({ required_error: "a Song is missing its file." }),
progress: zod.number().optional().transform(x => <typeof x>undefined)
});
Expand Down Expand Up @@ -118,7 +120,7 @@ export const payout = zod.object({
})
)
})
)
).optional()
});

export type Drop = zod.infer<typeof drop>;
Expand Down

0 comments on commit a1e3c84

Please sign in to comment.