File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type ImportRequest struct {
30
30
Name string `json:"name"`
31
31
TmdbID int `json:"tmdbId"`
32
32
Type ContentType `json:"type"`
33
- Rating int8 `json:"rating"`
33
+ Rating int8 `json:"rating" binding:"max=10" `
34
34
RatingCustomDate * time.Time `json:"ratingCustomDate"`
35
35
Status WatchedStatus `json:"status"`
36
36
Thoughts string `json:"thoughts"`
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ type WatchedEpisodeAddRequest struct {
31
31
SeasonNumber int `json:"seasonNumber"`
32
32
EpisodeNumber int `json:"episodeNumber"`
33
33
Status WatchedStatus `json:"status"`
34
- Rating int8 `json:"rating"`
34
+ Rating int8 `json:"rating" binding:"max=10" `
35
35
addActivity ActivityType `json:"-"`
36
36
addActivityDate time.Time `json:"-"`
37
37
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type WatchedSeasonAddRequest struct {
25
25
WatchedID uint `json:"watchedId"`
26
26
SeasonNumber int `json:"seasonNumber"`
27
27
Status WatchedStatus `json:"status"`
28
- Rating int8 `json:"rating"`
28
+ Rating int8 `json:"rating" binding:"max=10" `
29
29
addActivity ActivityType `json:"-"`
30
30
addActivityDate time.Time `json:"-"`
31
31
// Data to add to activity if the season is created.
You can’t perform that action at this time.
0 commit comments