Skip to content

Commit

Permalink
Parse lastEvaluatedKey in snapshot query
Browse files Browse the repository at this point in the history
  • Loading branch information
majecty committed Apr 22, 2020
1 parent 1017f89 commit ff0ac54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routers/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ export function handle(context: IndexerContext, router: Router) {
async (req, res, next) => {
const assetTypeString = req.query.assetType;
const date = req.query.date;
const lastEvaluatedKey = req.query.lastEvaluatedKey;
let lastEvaluatedKey = req.query.lastEvaluatedKey;
if (typeof lastEvaluatedKey === "string") {
lastEvaluatedKey = JSON.parse(lastEvaluatedKey);
}
try {
const assetType = new H160(assetTypeString);
const snapshotTime = moment(date);
Expand Down

0 comments on commit ff0ac54

Please sign in to comment.