fix limit being hard coded to 20
This commit is contained in:
parent
6181701da6
commit
70a780909a
@ -85,8 +85,8 @@ app:get("thread", "/:slug", function(self)
|
|||||||
posts.thread_id = ?
|
posts.thread_id = ?
|
||||||
ORDER BY
|
ORDER BY
|
||||||
posts.created_at ASC
|
posts.created_at ASC
|
||||||
LIMIT 20 OFFSET ?
|
LIMIT ? OFFSET ?
|
||||||
]], thread.id, (self.page - 1) * posts_per_page)
|
]], thread.id, posts_per_page, (self.page - 1) * posts_per_page)
|
||||||
self.topic = Topics:find(thread.topic_id)
|
self.topic = Topics:find(thread.topic_id)
|
||||||
self.user = util.get_logged_in_user_or_transient(self)
|
self.user = util.get_logged_in_user_or_transient(self)
|
||||||
self.posts = posts
|
self.posts = posts
|
||||||
|
Loading…
Reference in New Issue
Block a user