filterQuery function

RequestHandler filterQuery (
  1. Iterable<String> only
)

Filters unwanted data out of req.queryParameters.

Implementation

RequestHandler filterQuery(Iterable<String> only) {
  return (RequestContext req, res) async {
    var filtered = filter(req.queryParameters, only);
    req.queryParameters
      ..clear()
      ..addAll(filtered);
    return true;
  };
}