Skip to content

Fix: Mount v1Router to enable /api/v1/* routes - #20

Closed
bbjiggy wants to merge 1 commit into
grantFoxin:mainfrom
bbjiggy:fix-issue-9-mount-v1-router
Closed

Fix: Mount v1Router to enable /api/v1/* routes#20
bbjiggy wants to merge 1 commit into
grantFoxin:mainfrom
bbjiggy:fix-issue-9-mount-v1-router

Conversation

@bbjiggy

@bbjiggy bbjiggy commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Closes #9

Changes

  • Imported and mounted v1Router at /api/v1 (canonical namespace)
  • Added legacyApiDeprecation middleware to /api routes (legacy namespace)
  • Both namespaces now work as documented

Testing

# Canonical v1 endpoint now works
curl http://localhost:3001/api/v1/portfolio/GABC...

# Legacy endpoint still works with deprecation headers
curl -I http://localhost:3001/api/portfolio/GABC...

- Import and mount v1Router at /api/v1 (canonical namespace)
- Add legacyApiDeprecation middleware to /api routes
- Fixes 404 errors on all /api/v1/* endpoints

Closes grantFoxin#9
@bbjiggy
bbjiggy force-pushed the fix-issue-9-mount-v1-router branch from a4733e2 to eaac83b Compare June 18, 2026 13:08
@bbjiggy bbjiggy closed this Jun 18, 2026
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.

bug: /api/v1/* routes return 404 — v1Router is defined but never mounted in Express app

1 participant