Cosmetic changes
This commit is contained in:
parent
e6ba467d98
commit
ef3ffddec7
@ -1,8 +1,9 @@
|
||||
module.exports = function allowQueryParams(params) {
|
||||
module.exports = function allowQueryParams (params) {
|
||||
if (!Array.isArray(params)) {
|
||||
throw new Error('allowQueryParams must receive an Array of params');
|
||||
}
|
||||
return function allowQueryParamsMiddleware(req, res, next) {
|
||||
|
||||
return function allowQueryParamsMiddleware (req, res, next) {
|
||||
res.locals.allowedQueryParams = params;
|
||||
next();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user