import calculateParamOffset from 'helpers/calculateParamOffset';
import sanitizeParamLimit from 'helpers/sanitizeParamLimit';

export default ({ limit, page }) => {
  const saneLimit = sanitizeParamLimit(limit);

  return {
    resolve: 'city,owner',
    sort: '-created',
    offset: calculateParamOffset(page, saneLimit),
    limit: saneLimit
  };
};

@@ -337,16 +337,144 @@
 aneLimit
+,%0A    state: %5B%0A      'supportable.active',%0A      'supportable.winner',%0A      'loser',%0A      'processing.*',%0A      'closed'%0A    %5D
 %0A  %7D;%0A%7D;

Add state querying to petitions listing