From fdae24c68dfc35173b0a6c2b6d9e81bb0b3f9b00 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 15 Jul 2016 18:56:22 -0400 Subject: use page parameter for blog --- src/guff.cr | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/guff.cr') 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 -- cgit v1.2.3