mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-21 00:36:14 -06:00
move template functions before template loading
This commit is contained in:
parent
89c369f21e
commit
ac1783a697
3 changed files with 13 additions and 15 deletions
|
|
@ -85,10 +85,6 @@ func (m *Module) NotFoundHandler(c *gin.Context) {
|
|||
})
|
||||
}
|
||||
|
||||
func noescape(str string) template.HTML {
|
||||
return template.HTML(str)
|
||||
}
|
||||
|
||||
// Route satisfies the RESTAPIModule interface
|
||||
func (m *Module) Route(s router.Router) error {
|
||||
|
||||
|
|
@ -106,10 +102,6 @@ func (m *Module) Route(s router.Router) error {
|
|||
// 404 handler
|
||||
s.AttachNoRouteHandler(m.NotFoundHandler)
|
||||
|
||||
s.SetTemplateFuncMap(template.FuncMap{
|
||||
"noescape": noescape,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("error setting router FuncMap: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue