diff options
Diffstat (limited to 'anime/validators.go')
-rw-r--r-- | anime/validators.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/anime/validators.go b/anime/validators.go index 416f827..7f6a7cc 100644 --- a/anime/validators.go +++ b/anime/validators.go @@ -73,3 +73,24 @@ func isValidField(field string) bool { return false } +// Checks if given season is valid +func isValidSeason(season string) bool { + switch season { + case + "winter", + "spring", + "summer", + "fall": return true + } + return false +} + +// Checks if given sort is valid +func isValidSort(sort string) bool { + switch sort { + case + "anime_score", + "anime_num_list_users": return true + } + return false +} |