From e6644ac8f5bd574c075186447a4db5dd80145ea9 Mon Sep 17 00:00:00 2001 From: Rodolfo Miranda Date: Wed, 2 Aug 2023 22:33:09 -0300 Subject: [PATCH] fix_limit_skip --- src/keria/app/credentialing.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/keria/app/credentialing.py b/src/keria/app/credentialing.py index 7193890b..c788de43 100644 --- a/src/keria/app/credentialing.py +++ b/src/keria/app/credentialing.py @@ -312,13 +312,20 @@ def on_post(req, rep, name): sort = body["sort"] else: sort = None + + if "skip" in body: + skip = body["skip"] + else: + skip = 0 + + if "limit" in body: + limit = body["limit"] + else: + limit = 25 except falcon.HTTPError: filtr = {} sort = {} - skip = req.params.get("skip") - limit = req.params.get("limit") - cur = agent.seeker.find(filtr=filtr, sort=sort, skip=skip, limit=limit) saids = [coring.Saider(qb64=said) for said in cur] creds = agent.rgy.reger.cloneCreds(saids=saids)