Changed route settings service API names to upload and download - #29364
Conversation
b332bff to
24579d9
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
WalkthroughRenames Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 1m 54s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 51s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 59s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 32s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 19s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 30s | View ↗ |
nx run-many -t lint -p ghost,ghost-monorepo |
✅ Succeeded | 23s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 7s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-15 18:39:29 UTC
There was a problem hiding this comment.
Pull request overview
Renames the route settings service API methods to align with the Admin API operations they back (upload/download), updating the service, API endpoint usage, and unit tests accordingly.
Changes:
- Renamed
DynamicRoutingService.get()→download()andsetFromFilePath()→upload(). - Updated the settings API endpoint handlers to call
routeSettings.api.upload()/routeSettings.api.download(). - Updated unit tests to use the new method names.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ghost/core/test/unit/server/services/route-settings/dynamic-routing-service.test.ts | Updates unit tests to use download/upload method names. |
| ghost/core/core/server/services/route-settings/index.js | Renames the exported api method accessors to upload/download (potential compatibility concern noted in review comment). |
| ghost/core/core/server/services/route-settings/dynamic-routing-service.js | Renames service methods to download/upload while keeping behavior intact. |
| ghost/core/core/server/api/endpoints/settings.js | Updates API endpoint wiring to call the renamed route-settings API methods. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ref https://linear.app/ghost/issue/HKG-1830 - the service methods now carry the names of the Admin API operations they back: `get` was ambiguous sitting next to `store.get()`, and `setFromFilePath` describes a transport detail rather than what the caller is doing - mechanical rename only — signatures and behavior are unchanged, and upload still takes the multer tmp-file path; moving the file read to the API boundary (so the service's only I/O is the configured store) ships separately on top of this
24579d9 to
0ec451e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29364 +/- ##
==========================================
+ Coverage 74.01% 74.04% +0.02%
==========================================
Files 1578 1578
Lines 137508 137508
Branches 16648 16652 +4
==========================================
+ Hits 101772 101812 +40
+ Misses 34691 34681 -10
+ Partials 1045 1015 -30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

ref https://linear.app/ghost/issue/HKG-1830
getwas ambiguous sitting next tostore.get(), andsetFromFilePathdescribes a transport detail rather than what the caller is doing