add an inbox view
This commit is contained in:
9
app.lua
9
app.lua
@ -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
|
||||
|
Reference in New Issue
Block a user