fix getTags

This commit is contained in:
perennial
2024-10-21 02:17:26 +11:00
parent 3cf52b2122
commit 6ffb2062bc
+5 -2
View File
@@ -252,7 +252,10 @@ func getPopulatedWorks(auditor *audit.Auditor, r *http.Request, user *User, id s
var tagsIDs []string
// Since category is pre-validated, we don't need to handle unexpected categories
if category == &CategoryAny || category == &CategoryAnyAlt || category == &CategoryIllustration || category == &CategoryManga {
if category.Value == CategoryAny.Value ||
category.Value == CategoryAnyAlt.Value ||
category.Value == CategoryIllustration.Value ||
category.Value == CategoryManga.Value {
// Append illustrationIDs and mangaIDs if they are not empty
if illustrationIDs != "" {
auditor.Logger.Debug("illustrationIDs found, appending to tagsIDs")
@@ -262,7 +265,7 @@ func getPopulatedWorks(auditor *audit.Auditor, r *http.Request, user *User, id s
auditor.Logger.Debug("mangaIDs found, appending to tagsIDs")
tagsIDs = append(tagsIDs, mangaIDs)
}
} else if category == &CategoryNovels {
} else if category.Value == CategoryNovels.Value {
auditor.Logger.Debug("Using CategoryNovels to fetch tags")
if novelIDs != "" {
auditor.Logger.Debug("novelIDs found, appending to tagsIDs")