1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-27 11:26:22 -07:00

Push gctemplates module table to the stack in preload function

This commit is contained in:
Eggbertx 2024-01-22 09:52:34 -08:00
parent ea37e22ea6
commit c26b7e9e1d
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
-- testing manage page registering from Lua plugins
local strings = require("strings")
local gctemplates = require("gctemplates")
local manage = require("manage")
local serverutil = require("serverutil")
@ -18,7 +19,7 @@ manage.register_manage_page("templateplugintest",
"Template Plugin Testing",
3, 0,
function(writer, request, staff, wantsJSON, infoEv, errEv)
local tmpl, err = parse_template("parse_template_test",
local tmpl, err = gctemplates.parse_template("parse_template_test",
[[<b>Staff: </b> {{.staff.Username}}<br/>
This manage page rendered from a template provided by a Lua plugin]])
if(err ~= nil) then

View file

@ -28,6 +28,6 @@ func PreloadModule(l *lua.LState) int {
return 1
},
})
l.Push(t)
return 1
}