Trek_CN/server/tests/unit
jubnl da70388f4b
fix(journey): resolve Immich photos on public share by matching trek_photos.id
validateShareTokenForPhoto was querying journey_photos by jp.id but the
public page sends p.photo_id (trek_photos.id) in the URL. In a fresh
database the IDs coincidentally match, masking the bug. In production
instances with many Immich-synced photos the trek_photos autoincrement
is far ahead of journey_photos, causing a 404 for every Immich photo
on the public share page.

Fix: change the lookup to jp.photo_id = ? so validation is keyed on
trek_photos.id, which is what the client sends and what streamPhoto
needs. Updated the test helper to return trekId and added a regression
test that pre-populates trek_photos to produce diverging IDs. Closes #675.
2026-04-16 15:37:24 +02:00
..
mcp test: add comprehensive coverage for OAuth scopes, MCP, and core services 2026-04-11 14:08:09 +02:00
middleware feat(pwa): implement real offline mode with IndexedDB sync 2026-04-14 23:04:25 +02:00
services fix(journey): resolve Immich photos on public share by matching trek_photos.id 2026-04-16 15:37:24 +02:00
systemNotices fix(system-notices): coerce prerelease app version before semver comparison 2026-04-16 14:58:38 +02:00
utils test: expand test suite to 87.3% backend coverage 2026-04-06 20:08:30 +02:00
scheduler.test.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00