mirror of
https://github.com/p-stream/backend.git
synced 2026-03-11 17:55:35 +00:00
minor fix, validates the number is between 0 and 10
This commit is contained in:
parent
3ea2d71d0b
commit
2c6666494b
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ import { z } from 'zod';
|
||||||
const userRatingsSchema = z.object({
|
const userRatingsSchema = z.object({
|
||||||
tmdb_id: z.number(),
|
tmdb_id: z.number(),
|
||||||
type: z.enum(['movie', 'tv']),
|
type: z.enum(['movie', 'tv']),
|
||||||
rating: z.number()
|
rating: z.number().min(0).max(10)
|
||||||
});
|
});
|
||||||
|
|
||||||
export default defineEventHandler(async (event) => {
|
export default defineEventHandler(async (event) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue