Skip to content

Commit

Permalink
fix: meta tags should be []string
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Oct 14, 2024
1 parent b0f0e18 commit 1ebab66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions web/handler/subject/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,8 @@ func convertModelSubject(s model.Subject, totalEpisode int64, metaTags []tag.Tag
Volumes: s.Volumes,
Redirect: s.Redirect,
Eps: s.Eps,
MetaTags: lo.Map(metaTags, func(item tag.Tag, index int) res.SubjectTag {
return res.SubjectTag{
Name: item.Name,
Count: item.Count,
TotalCont: item.TotalCount,
}
MetaTags: lo.Map(metaTags, func(item tag.Tag, index int) string {
return item.Name
}),
Tags: slice.Map(s.Tags, func(tag model.Tag) res.SubjectTag {
return res.SubjectTag{
Expand Down
2 changes: 1 addition & 1 deletion web/res/subject.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type SubjectV0 struct {
Collection SubjectCollectionStat `json:"collection"`
ID model.SubjectID `json:"id"`
Eps uint32 `json:"eps"`
MetaTags []SubjectTag `json:"meta_tags"`
MetaTags []string `json:"meta_tags"`
Volumes uint32 `json:"volumes"`
Series bool `json:"series"`
Locked bool `json:"locked"`
Expand Down

0 comments on commit 1ebab66

Please sign in to comment.