fix: allow exposeUid and exposeGroupName to work with slugs with mixed capitalization

This commit is contained in:
Julian Lam
2023-01-24 21:58:39 -05:00
parent 44ea9da022
commit 3ff12a131c

View File

@@ -151,7 +151,7 @@ async function expose(exposedField, method, field, req, res, next) {
if (!req.params.hasOwnProperty(field)) {
return next();
}
const value = await method(req.params[field]);
const value = await method(String(req.params[field]).toLowerCase());
if (!value) {
next('route');
}