add an inbox view

This commit is contained in:
2025-06-02 23:05:28 +03:00
parent bd1ba6c087
commit 22526c953e
11 changed files with 178 additions and 6 deletions

View File

@ -1,5 +1,6 @@
local lapis = require("lapis")
local date = require("date")
local models = require("models")
local app = lapis.Application()
local constants = require("constants")
local babycode = require("lib.babycode")
@ -47,6 +48,14 @@ local function inject_methods(req)
req.babycode_to_html = function (_, bb)
return babycode.to_html(bb, html_escape)
end
req.get_thread_by_id = function(_, id)
return models.Threads:find({id = id})
end
req.get_post_url = function(_, id)
return util.get_post_url(_, id)
end
util.pop_infobox(req)
end