some things

This commit is contained in:
2025-05-19 09:12:59 +03:00
parent 5ec458702a
commit 85b1319c79
6 changed files with 20 additions and 6 deletions

View File

@@ -62,9 +62,7 @@ app:get("topic", "/:slug", function(self)
return {status = 404}
end
self.topic = topic
self.threads_list = Threads:select(db.clause({
topic_id = topic.id
}))
self.threads_list = db.query("SELECT * FROM threads WHERE topic_id = ? ORDER BY is_stickied DESC, created_at DESC", topic.id)
local user = util.get_logged_in_user_or_transient(self)
print(topic.is_locked, type(topic.is_locked))
self.user = user