todos-contra-el-fuego-web/imports/api/Common
vjrj 9feaca9d0b fix: fire ids leaked into URLs as ObjectID("...") on Mongo 7
Fire collections use idGeneration:'MONGO', so _id is a Mongo.ObjectID whose
toString() is ObjectID("<hex>"), not the bare hex. Interpolating _id into a
URL produced /fire/archive/ObjectID("c0..."), which no route matches -> the
fire-detail page 404'd. New hexId() helper returns the 24-char hex for an
ObjectID (and passes plain strings through); applied at the three string-context
sites: the map-marker click URL (MarkListeners), the active->archive redirect,
and the comments referenceId (Fires.js). Left falsePositives.insert untouched —
its check() expects a Meteor.Collection.ObjectID, so it takes the object.

Verified in browser: /fire/archive/<hex> and /fire/active/<hex> render the
detail page (map + comments), URL stays clean hex, no ObjectID( anywhere.
2026-07-17 18:31:59 +02:00
..
dates.js Added nasa link 2018-03-12 10:24:46 +01:00
FiresSchema.js Change fires schema 2018-01-24 17:10:19 +01:00
id.js fix: fire ids leaked into URLs as ObjectID("...") on Mongo 7 2026-07-17 18:31:59 +02:00