Revisions on grid page to make parameters easier to grok

This commit is contained in:
2023-09-25 16:26:42 -07:00
parent e23cc6e8fd
commit d5565f7cf8
9 changed files with 107 additions and 89 deletions

View File

@@ -623,14 +623,16 @@
(defn apply-pagination-raw [args results]
{:entries (->> results
(drop (:start args 0))
(take (:count args (or (:per-page args) default-pagination-size))))
(drop (or (:start args) 0))
(take (or (:count args) (:per-page args) default-pagination-size)))
:count (count results)})
(defn apply-pagination [args results]
{:ids (->> results
(drop (:start args 0))
(take (:count args (or (:per-page args) default-pagination-size)))
(drop (or (:start args) 0))
(take (or (:count args )
(:per-page args)
default-pagination-size))
(map last))
:count (count results)})