diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2022-02-28 05:35:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 05:35:39 +0000 |
commit | 06425ac756f916bca10d0f8797cf575a77dcf69d (patch) | |
tree | 7b4df51906c714f83a2bdce710e218a5cbb6672e /errhandlers/manga_validators.go | |
parent | f44303ee9de8da4e330116d2c6e6048d59b52526 (diff) | |
parent | 38f7861cc533081aba7458ef52a25acdeddd1f16 (diff) |
Merge pull request #7 from MikunoNaka/user-mangalist
Added functionality to update manga lists
Diffstat (limited to 'errhandlers/manga_validators.go')
-rw-r--r-- | errhandlers/manga_validators.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/errhandlers/manga_validators.go b/errhandlers/manga_validators.go index fa12e5f..e54107d 100644 --- a/errhandlers/manga_validators.go +++ b/errhandlers/manga_validators.go @@ -68,3 +68,29 @@ func IsValidMangaRankingType(rankingType string) bool { } return false } + +// Checks if given sort is valid +func IsValidMangaListSort(sort string) bool { + switch sort { + case + "list_score", + "list_updated_at", + "manga_title", + "manga_start_date", + "manga_id": return true + } + return false +} + +// Checks if given list status is valid +func IsValidMangaListStatus(status string) bool { + switch status { + case + "reading", + "completed", + "on_hold", + "dropped", + "plan_to_read": return true + } + return false +} |