From 84c2070fc9ffd158286037eecda283047e8ec491 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 7 May 2016 19:24:46 -0400 Subject: [PATCH] Allow custom ID's for models Currently any Id that does not match /^[0-9a-f]{24}$/ will result in a 404 (such as UUIDv4). --- src/index.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.coffee b/src/index.coffee index 72de589..897f459 100644 --- a/src/index.coffee +++ b/src/index.coffee @@ -266,7 +266,6 @@ class Admin return next() pId: (req, res, next)-> - return res.send(404) if not req.params.id.match /^[0-9a-f]{24}$/ query = req.$p.model.obj.findById(req.params.id) query = query.populate req.$p.model.fieldsToPopulate.join(' ') query.exec (err, doc)->