Use limit parameter in post query (#18)

Fixes #14
This commit is contained in:
Simon Fondrie-Teitler 2023-05-15 13:26:38 -04:00 committed by GitHub
parent 2bff86cb4e
commit d93c993883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@ export default function (server: Server, ctx: AppContext) {
.selectAll() .selectAll()
.orderBy('indexedAt', 'desc') .orderBy('indexedAt', 'desc')
.orderBy('cid', 'desc') .orderBy('cid', 'desc')
.limit(params.limit)
if (params.cursor) { if (params.cursor) {
const [indexedAt, cid] = params.cursor.split('..') const [indexedAt, cid] = params.cursor.split('..')