Skip to content

Commit

Permalink
fix: 🐛 Fix api of get accounts 'limit undefined'
Browse files Browse the repository at this point in the history
  • Loading branch information
imfly committed Sep 18, 2020
1 parent d798b0a commit 85eb85a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/peer/src/network/service/api/accounts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,6 @@ class AccountService {

async getTop (req) {
const query = Object.assign({}, req.body, req.query)
const offset = Number(query.offset || 0)
const limit = Number(query.limit || 100)

if (Number.isNaN(limit) || Number.isNaN(offset)) {
throw new Error('Invalid parameters: limit or offset')
}

const queryResult = await this.runtime.account.getAccountList({
sort: [['balance', 'DESC']], // wxm block database
offset: query.offset,
Expand Down

0 comments on commit 85eb85a

Please sign in to comment.