wip fixing last_page err

This commit is contained in:
Tangent 2019-06-13 09:19:45 -07:00
parent 1f893bf18e
commit e3eb8d2a5c

View File

@ -61,7 +61,8 @@ class extends lapis.Application
@page = tonumber(@params.page) or 1
tracks = Tracks\paginated "* ORDER BY #{escape_identifier @order} #{@asc_desc}", per_page: 32
@last_page = tracks\num_pages! -- TODO figure out why this errors
-- @last_page = tracks\num_pages! -- TODO figure out why this errors
@last_page = math.floor Tracks\count("true") / 32
-- @last_page = 150
-- validate page
if @page < 1