Trek_CN/server/src/services
jubnl 2aad8f465c
fix(maps): prevent server crash when legacy Google photo URLs are stored as placeIds
Migration 107 only rewrote image_url rows matching /places/%/photos/%; URLs using
the /place-photos/ or /places/<opaque> paths survived the upgrade and were passed
verbatim to the Places API, producing a malformed request whose empty/HTML response
body threw SyntaxError before detailsRes.ok was checked. The resulting rejection was
leaked by placePhotoCache.setInFlight via an unhandled .finally() chain, triggering
Node 22's default unhandledRejection=throw and terminating the process.

- placePhotoCache: add .catch() after .finally() to prevent unhandled rejection crash
- mapsService: reject URL-shaped placeIds early; read response as text before JSON.parse
- migrations: add migration to rewrite remaining googleusercontent/places.googleapis URLs
- MapView/MapViewGL: prefer stable proxy URL form of image_url before google_place_id

Fixes #770
2026-04-21 00:13:35 +02:00
..
memories fix: pre-release UI bug batch 2026-04-20 21:53:45 +02:00
adminService.ts feat(maps): add kill switches for Google Places autocomplete and details 2026-04-17 19:28:40 +02:00
airportService.ts refactor: move airports.json out of server/data into server/assets 2026-04-18 02:02:09 +02:00
apiKeyCrypto.ts Add comprehensive backend test suite (#339) 2026-04-03 13:17:53 +02:00
assignmentService.ts fix(dayplan): restore time-based auto-sort for places and free reorder for untimed 2026-04-05 23:26:35 +02:00
atlasService.ts feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
auditLog.ts fix: add SSRF protection for link preview and Immich URL 2026-04-01 07:59:03 +02:00
authService.ts security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
backupService.ts security: address silent-failure review findings on top of batch 1 2026-04-20 20:44:57 +02:00
budgetService.ts feat: drag-and-drop reorder for budget categories and items (#479) 2026-04-09 19:21:43 +02:00
categoryService.ts refactor: extract business logic from routes into reusable service modules 2026-04-02 17:14:53 +02:00
collabService.ts refactor(mcp): extract all MCP tools into dedicated modules and add shared helpers 2026-04-09 18:09:33 +02:00
cookie.ts security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
dayNoteService.ts refactor: extract business logic from routes into reusable service modules 2026-04-02 17:14:53 +02:00
dayService.ts fix(bookings): preserve accommodation dates when place is unlinked or missing 2026-04-20 23:09:05 +02:00
demo.ts security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
ephemeralTokens.ts refactor(server): replace node-fetch with native fetch + undici, fix photo integrations 2026-04-05 21:12:51 +02:00
fileService.ts security: address silent-failure review findings on top of batch 1 2026-04-20 20:44:57 +02:00
inAppNotificationActions.ts feat: add in-app notification system with real-time delivery 2026-04-02 18:57:52 +02:00
inAppNotifications.ts fix: missing avatar URLs in notifications, admin panel, and budget 2026-04-08 18:17:08 +02:00
journeyService.ts add mapbox gl option, gps location, journey reorder + polish 2026-04-19 01:41:02 +02:00
journeyShareService.ts fix journey bugs reported by roel-de-vries (#722-#736) 2026-04-18 19:11:16 +02:00
kmlImport.ts feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
mapsService.ts fix(maps): prevent server crash when legacy Google photo URLs are stored as placeIds 2026-04-21 00:13:35 +02:00
mfaCrypto.ts fix: decouple at-rest encryption from JWT_SECRET, add JWT rotation 2026-04-01 07:57:55 +02:00
notificationPreferencesService.ts feat(notifications): reminders for todos with upcoming due dates 2026-04-20 17:31:25 +02:00
notifications.ts feat(notifications): reminders for todos with upcoming due dates 2026-04-20 17:31:25 +02:00
notificationService.ts feat(notifications): reminders for todos with upcoming due dates 2026-04-20 17:31:25 +02:00
oauthService.ts security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
oidcService.ts security: close SEC-H4/H6 gaps from second-pass review 2026-04-20 21:35:30 +02:00
packingService.ts feat(packing): item quantity, bag rename, multi-user bags, save as template 2026-04-05 19:28:33 +02:00
passwordPolicy.ts fix: unify password validation error to show all requirements at once 2026-04-01 10:14:35 +02:00
permissions.ts fix: tighten trip_edit and member_manage defaults to trip_owner 2026-03-31 23:52:29 +02:00
placePhotoCache.ts fix(maps): prevent server crash when legacy Google photo URLs are stored as placeIds 2026-04-21 00:13:35 +02:00
placeService.ts feat(import): selective GPX/KML element import and performance improvements 2026-04-18 01:28:37 +02:00
queryHelpers.ts refactor(mcp): replace direct DB access with service layer calls 2026-04-04 18:12:53 +02:00
reservationService.ts fix(bookings): preserve accommodation dates when place is unlinked or missing 2026-04-20 23:09:05 +02:00
settingsService.ts docs: add full wiki with 74 pages, assets, and CI workflow 2026-04-20 10:11:53 +02:00
shareService.ts security: internal audit — batch 1 2026-04-20 20:36:52 +02:00
tagService.ts refactor: extract business logic from routes into reusable service modules 2026-04-02 17:14:53 +02:00
todoService.ts feat(todo): add To-Do list feature with 3-column layout 2026-04-04 16:58:24 +02:00
tripService.ts fix(trips): preserve day content when trip date range changes 2026-04-15 01:28:53 +02:00
vacayService.ts feat: configurable week start day in Vacay (Monday or Sunday) 2026-04-12 02:18:45 +02:00
weatherService.ts dayplan toolbar polish + weather archive fallback 2026-04-18 11:34:57 +02:00