Skip to content

Commit

Permalink
Merge branch 'master' into fix/multiple-evm-chain
Browse files Browse the repository at this point in the history
  • Loading branch information
samparsky authored Dec 21, 2020
2 parents f2eb179 + 99e72de commit 12e31e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routes/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ function getEventAggregates(req, res, next) {
async function getList(req, res, next) {
const { CHANNELS_FIND_LIMIT } = cfg
// assign 0 default value
const { page = 0, validUntil } = req.query
const { page: paramsPage, validUntil } = req.query
const channelsCol = db.getMongo().collection('channels')
const skip = page && parseInt(page, 10) * CHANNELS_FIND_LIMIT
const page = parseInt(paramsPage, 10) || 0
const skip = page * CHANNELS_FIND_LIMIT
let query = {
validUntil: { $gt: parseInt(validUntil, 10) || Math.floor(Date.now() / 1000) }
}
Expand Down

0 comments on commit 12e31e8

Please # to comment.