Skip to content

Commit

Permalink
fix(sort): Fix sort on query
Browse files Browse the repository at this point in the history
  • Loading branch information
James Talton authored and James Talton committed Feb 25, 2019
1 parent 229f40b commit 46319b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mongo-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function getCollectionRoute(ctx: Koa.Context) {
ctx.set('X-Total-Count', count.toString())
}
if (query.sort != undefined) {
cursor.sort(query.limit)
cursor.sort(query.sort)
}
if (query.skip != undefined) {
cursor.skip(query.skip)
Expand Down

0 comments on commit 46319b0

Please sign in to comment.