[PR #1079] [MERGED] feat: allow tag filtering and count retrieval via api #973

Closed
opened 2026-02-25 23:36:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/1079
Author: @fmartingr
Created: 3/12/2025
Status: Merged
Merged: 3/12/2025
Merged by: @fmartingr

Base: masterHead: feat/bookmark-tags-endpoint-refactor


📝 Commits (8)

  • baf91d9 fix: frontend url to retrieve bookmark count
  • 7d040b7 chore: unneeded type in generic
  • 326b785 feat: allow tag filtering and count retrieval
  • debdf1a fix: make styles
  • e772791 fix: make swagger
  • 20931db fix: make swag
  • 5a52bd3 tests: refactored gettags tests
  • 0ec5819 fix: initialise tags empty slice

📊 Changes

26 files changed (+734 additions, -236 deletions)

View changed files

📝 docs/swagger/docs.go (+14 -0)
📝 docs/swagger/swagger.json (+14 -0)
📝 docs/swagger/swagger.yaml (+9 -0)
📝 internal/cmd/root.go (+1 -1)
📝 internal/database/database.go (+47 -2)
internal/database/database_tags.go (+69 -0)
internal/database/database_tags_test.go (+244 -0)
📝 internal/database/database_test.go (+7 -107)
📝 internal/database/mysql.go (+1 -32)
📝 internal/database/mysql_test.go (+1 -1)
📝 internal/database/pg.go (+4 -35)
📝 internal/database/pg_test.go (+1 -1)
📝 internal/database/sqlite.go (+4 -26)
📝 internal/database/sqlite_noncgo.go (+6 -2)
📝 internal/database/sqlite_openbsd.go (+6 -2)
📝 internal/domains/tags.go (+2 -2)
📝 internal/domains/tags_test.go (+125 -6)
📝 internal/http/handlers/api/v1/tags.go (+26 -7)
📝 internal/http/handlers/api/v1/tags_test.go (+109 -0)
📝 internal/model/database.go (+13 -1)

...and 6 more files

📄 Description

Added missing stuff for #658:

  • Allows to retrieve the bookmark tag count on tags
  • Allows to filter tags by bookmark ID
  • Refactored the database logic to have common methods for all engines to reuse code with the sql builder

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/1079 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 3/12/2025 **Status:** ✅ Merged **Merged:** 3/12/2025 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `feat/bookmark-tags-endpoint-refactor` --- ### 📝 Commits (8) - [`baf91d9`](https://github.com/go-shiori/shiori/commit/baf91d9f65cc9f496bced977c3d7b4893aae44a0) fix: frontend url to retrieve bookmark count - [`7d040b7`](https://github.com/go-shiori/shiori/commit/7d040b71f8588bc798c043a134f628ebabe36b20) chore: unneeded type in generic - [`326b785`](https://github.com/go-shiori/shiori/commit/326b78590e837923b24441830367e5c0ae4c0ce4) feat: allow tag filtering and count retrieval - [`debdf1a`](https://github.com/go-shiori/shiori/commit/debdf1af41dd7242c39e1cc6a8bc64ce349d880e) fix: make styles - [`e772791`](https://github.com/go-shiori/shiori/commit/e772791f4753dd81519b85c6c62cded5c93cda79) fix: make swagger - [`20931db`](https://github.com/go-shiori/shiori/commit/20931db269f423c7bac7734585aee3969d333d47) fix: make swag - [`5a52bd3`](https://github.com/go-shiori/shiori/commit/5a52bd35303c8b786b9588adf113592acbef48bf) tests: refactored gettags tests - [`0ec5819`](https://github.com/go-shiori/shiori/commit/0ec581956bf0efe1299ed5b767c934a37f881d81) fix: initialise tags empty slice ### 📊 Changes **26 files changed** (+734 additions, -236 deletions) <details> <summary>View changed files</summary> 📝 `docs/swagger/docs.go` (+14 -0) 📝 `docs/swagger/swagger.json` (+14 -0) 📝 `docs/swagger/swagger.yaml` (+9 -0) 📝 `internal/cmd/root.go` (+1 -1) 📝 `internal/database/database.go` (+47 -2) ➕ `internal/database/database_tags.go` (+69 -0) ➕ `internal/database/database_tags_test.go` (+244 -0) 📝 `internal/database/database_test.go` (+7 -107) 📝 `internal/database/mysql.go` (+1 -32) 📝 `internal/database/mysql_test.go` (+1 -1) 📝 `internal/database/pg.go` (+4 -35) 📝 `internal/database/pg_test.go` (+1 -1) 📝 `internal/database/sqlite.go` (+4 -26) 📝 `internal/database/sqlite_noncgo.go` (+6 -2) 📝 `internal/database/sqlite_openbsd.go` (+6 -2) 📝 `internal/domains/tags.go` (+2 -2) 📝 `internal/domains/tags_test.go` (+125 -6) 📝 `internal/http/handlers/api/v1/tags.go` (+26 -7) 📝 `internal/http/handlers/api/v1/tags_test.go` (+109 -0) 📝 `internal/model/database.go` (+13 -1) _...and 6 more files_ </details> ### 📄 Description Added missing stuff for #658: - Allows to retrieve the bookmark tag count on tags - Allows to filter tags by bookmark ID - Refactored the database logic to have common methods for all engines to reuse code with the sql builder --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:36:04 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#973
No description provided.