diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-07-15 18:56:22 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-07-15 18:56:22 -0400 |
commit | fdae24c68dfc35173b0a6c2b6d9e81bb0b3f9b00 (patch) | |
tree | 1757ab679bd95785fd3dbc885a64a1415aad9d2f /src/guff.cr | |
parent | 7f1e563feb8efd97a54d943cb4ec4d58a454d7e8 (diff) | |
download | guff-fdae24c68dfc35173b0a6c2b6d9e81bb0b3f9b00.tar.bz2 guff-fdae24c68dfc35173b0a6c2b6d9e81bb0b3f9b00.zip |
use page parameter for blog
Diffstat (limited to 'src/guff.cr')
-rw-r--r-- | src/guff.cr | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/guff.cr b/src/guff.cr index 87e58ad..2343d12 100644 --- a/src/guff.cr +++ b/src/guff.cr @@ -2612,12 +2612,15 @@ module Guff if request.method == "GET" if md = PATH_RE.match(request.path.not_nil!) if site_id = get_site_id(request.headers["host"]?) + # get request parameters + params = request.query_params + r = @context.models.blog.get_ids( site_id: site_id, year: md["year"]? ? md["year"].to_i : nil, month: md["month"]? ? md["month"].to_i : nil, day: md["day"]? ? md["day"].to_i : nil, - page: md["page"]? ? md["page"].to_i : nil, + page: params["page"]? ? params["page"].to_i : nil, ) end end |