Skip to content

chore(api): remove the pre-2.0 API and its 7-day login tokens - #107

Merged
LEVELING2108 merged 1 commit into
researchfrom
chore/remove-legacy-api
Nov 13, 2026
Merged

LEVELING2108 merged 1 commit into
researchfrom
chore/remove-legacy-api

Conversation

@LEVELING2108

Copy link
Copy Markdown
Owner

The old routes (/api/places, /api/events, /api/itinerary, /api/user, /api/weather; 17 endpoints) were still mounted although nothing calls them: the web app and Android build use /api/v1 only, and the server log since the last deploy shows 176 /api/v1 calls and none to the old routes. They were also a security gap:

  • /api/user/login issued 7-day tokens that /api/v1 accepted, so they outlived sign-out, password reset and session revocation
  • /api/user/register skipped validation and terms consent, gave 150 XP

Removed the routes, their controllers, the old auth middleware and rate limits, config/jwt.ts and the unused Overpass service; verifyAccessToken no longer accepts { id } tokens. WEATHER_API_KEY and GEMINI_API_KEY are no longer read. /api/health stays. BACKEND.md now documents /api/v1.

Tests: old routes return 404, an old-style token is refused while a new login works, /api/health still answers; API suite 147/147.

The old routes (/api/places, /api/events, /api/itinerary, /api/user,
/api/weather; 17 endpoints) were still mounted although nothing calls
them: the web app and Android build use /api/v1 only, and the server
log since the last deploy shows 176 /api/v1 calls and none to the old
routes. They were also a security gap:
- /api/user/login issued 7-day tokens that /api/v1 accepted, so they
  outlived sign-out, password reset and session revocation
- /api/user/register skipped validation and terms consent, gave 150 XP

Removed the routes, their controllers, the old auth middleware and rate
limits, config/jwt.ts and the unused Overpass service; verifyAccessToken
no longer accepts { id } tokens. WEATHER_API_KEY and GEMINI_API_KEY are
no longer read. /api/health stays. BACKEND.md now documents /api/v1.

Tests: old routes return 404, an old-style token is refused while a new
login works, /api/health still answers; API suite 147/147.
@LEVELING2108
LEVELING2108 merged commit a845cba into research Nov 13, 2026
8 checks passed
@LEVELING2108
LEVELING2108 deleted the chore/remove-legacy-api branch November 13, 2026 20:34
LEVELING2108 added a commit that referenced this pull request Nov 13, 2026
Release: research into main (remove pre-2.0 API, #107)
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.

1 participant