Skip to content

feat(apiv1): refactor tags api#1075

Merged
fmartingr merged 10 commits intomasterfrom
feat/api-v1-tags-refactr
Mar 11, 2025
Merged

feat(apiv1): refactor tags api#1075
fmartingr merged 10 commits intomasterfrom
feat/api-v1-tags-refactr

Conversation

@fmartingr
Copy link
Copy Markdown
Member

  • Refactors the tags api to the new API v1
  • Since tags interact with bookmarks an internal refactor was needed, some queries were migrated to go-sqlbuilder but I left as much of the bookmarks logic as I could intact, since that will be dealt with in a separate PR.
  • Now that we use a query builder, one of the next steps is to use a base database implementation in all engines that will have the queries common to all engines, to prevent code duplication.
    -Added a bunch of test cases to ensure that both the new and old logic works as expected

Closes #921 #658

@fmartingr fmartingr self-assigned this Mar 8, 2025
@jparrill
Copy link
Copy Markdown

jparrill commented Mar 8, 2025

/cc @jparrill

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 75.99376% with 308 lines in your changes missing coverage. Please review.

Project coverage is 49.14%. Comparing base (cac1ba8) to head (5af513c).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
internal/database/mysql.go 69.76% 92 Missing and 22 partials ⚠️
internal/database/pg.go 76.34% 60 Missing and 19 partials ⚠️
internal/database/sqlite.go 77.49% 60 Missing and 19 partials ⚠️
internal/http/handlers/api/v1/tags.go 84.94% 13 Missing and 1 partial ⚠️
internal/domains/tags.go 61.29% 9 Missing and 3 partials ⚠️
internal/http/handlers/api/v1/bookmarks.go 67.74% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1075      +/-   ##
==========================================
+ Coverage   41.06%   49.14%   +8.07%     
==========================================
  Files          70       71       +1     
  Lines        5929     6967    +1038     
==========================================
+ Hits         2435     3424     +989     
- Misses       3214     3221       +7     
- Partials      280      322      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fmartingr fmartingr marked this pull request as ready for review March 11, 2025 16:36
@fmartingr fmartingr merged commit cdc13ed into master Mar 11, 2025
17 checks passed
@fmartingr fmartingr deleted the feat/api-v1-tags-refactr branch March 11, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants