Skip to content

fix(subject): exclude redirected entries from /v0/subjects#1030

Merged
trim21 merged 3 commits intobangumi:masterfrom
trim21:fix/v0-subjects-exclude-redirect
Mar 4, 2026
Merged

fix(subject): exclude redirected entries from /v0/subjects#1030
trim21 merged 3 commits intobangumi:masterfrom
trim21:fix/v0-subjects-exclude-redirect

Conversation

@trim21
Copy link
Contributor

@trim21 trim21 commented Mar 4, 2026

Summary

  • exclude redirected subjects ( ield_redirect != 0) from subject browse/count queries
  • prevent /v0/subjects from returning entries redirected to canonical subjects (e.g. to subject/2)
  • add repository browse test assertions to ensure redirected entries are not returned

Testing

  • existing pre-commit hooks passed (gofmt, go mod tidy)

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 4, 2026
@trim21 trim21 merged commit 411a631 into bangumi:master Mar 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant