diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-19 13:49:35 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-09-19 13:49:35 +0530 |
commit | 6856164d8959acc218d29e57f5456119cae01e9e (patch) | |
tree | 4b8367c6bb66e5ff2e3cd5fa1c160d10362ff777 /validators.go | |
parent | 33283bff8b1ae239036aeb1526ec3b7483767ed7 (diff) |
Bug Fix: getting author detailsv0.0.6
Diffstat (limited to 'validators.go')
-rw-r--r-- | validators.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/validators.go b/validators.go index dd45014..de4d0a5 100644 --- a/validators.go +++ b/validators.go @@ -118,7 +118,14 @@ func validateMangaFields(fields *[]string) error { } // check if given fields exist in DefaultAnimeFields - for _, f := range *fields { + for i, f := range *fields { + if f == "authors" { + f = "authors{first_name,last_name}" + x := *fields + x[i] = f + *fields = x + } + if !slices.Contains(DefaultMangaFields, f) { return ErrInvalidField } |