Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

[WIP] Links API

Open allouis opened this issue 3 years ago • 1 comments

This expose the /links endpoint on the Admin API, which is filterable by Post ID.

We also add in memory repository implementations, just because they exist locally. I don't think we should necessarily merge them with this PR, but it is what I was building this API against initially.

Missing tests & some small bug fixes

allouis avatar Sep 20 '22 22:09 allouis

Codecov Report

Base: 53.33% // Head: 53.28% // Decreases project coverage by -0.04% :warning:

Coverage data is based on head (6aa1764) compared to base (98fc808). Patch coverage: 28.57% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15446      +/-   ##
==========================================
- Coverage   53.33%   53.28%   -0.05%     
==========================================
  Files        1418     1419       +1     
  Lines       89465    89662     +197     
  Branches     9650     9656       +6     
==========================================
+ Hits        47713    47774      +61     
- Misses      40797    40937     +140     
+ Partials      955      951       -4     
Impacted Files Coverage Δ
ghost/admin/app/controllers/posts/analytics.js 0.00% <0.00%> (ø)
...ervices/link-redirection/LinkRedirectRepository.js 0.00% <0.00%> (ø)
...ore/core/server/services/link-redirection/index.js 0.00% <0.00%> (ø)
ghost/core/core/server/models/link-redirect.js 24.61% <9.37%> (-14.78%) :arrow_down:
.../core/server/services/link-click-tracking/index.js 21.42% <11.11%> (-1.43%) :arrow_down:
...ervices/link-click-tracking/LinkClickRepository.js 39.28% <22.22%> (-9.44%) :arrow_down:
...services/link-click-tracking/PostLinkRepository.js 50.00% <37.14%> (-17.86%) :arrow_down:
ghost/link-tracking/lib/FullPostLink.js 61.11% <61.11%> (ø)
...host/link-tracking/lib/LinkClickTrackingService.js 59.84% <77.77%> (+2.83%) :arrow_up:
ghost/link-redirects/lib/LinkRedirectsService.js 55.55% <100.00%> (+0.49%) :arrow_up:
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 20 '22 22:09 codecov[bot]

I moved the in memory repositories to a different PR for now: https://github.com/TryGhost/Ghost/pull/15455

SimonBackx avatar Sep 22 '22 11:09 SimonBackx