update http/render

This commit is contained in:
Henry 2021-02-22 16:20:26 +01:00
parent 9c0d4c9fd4
commit 73471b5ff6
5 changed files with 6 additions and 1 deletions

2
go.mod
View File

@ -27,7 +27,7 @@ require (
go.cryptoscope.co/muxrpc/v2 v2.0.0-20210202162901-fe642d405dc6
go.cryptoscope.co/netwrap v0.1.1
go.cryptoscope.co/secretstream v1.2.2
go.mindeco.de v1.7.3-0.20210216124941-2da08c6b0080
go.mindeco.de v1.8.0
go.mindeco.de/ssb-refs v0.1.1-0.20210108133850-cf1f44fea870
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9

2
go.sum
View File

@ -450,6 +450,8 @@ go.mindeco.de v1.7.2 h1:nuiz9ZJbRx+HHIobKi/J8rSE4A3cf8KArzQsjlF6f1o=
go.mindeco.de v1.7.2/go.mod h1:ePOcyktbpqzhMPRBDv2gUaDd3h8QtT+DUU1DK+VbQZE=
go.mindeco.de v1.7.3-0.20210216124941-2da08c6b0080 h1:wbrGjnr0dZetkGZURd9RhsXhYW0MC3cwovcy3kXXeKw=
go.mindeco.de v1.7.3-0.20210216124941-2da08c6b0080/go.mod h1:ePOcyktbpqzhMPRBDv2gUaDd3h8QtT+DUU1DK+VbQZE=
go.mindeco.de v1.8.0 h1:Vxob3XaDz85aD4wq8VbQxtradpHbmjciG2eSJLGaFV0=
go.mindeco.de v1.8.0/go.mod h1:ePOcyktbpqzhMPRBDv2gUaDd3h8QtT+DUU1DK+VbQZE=
go.mindeco.de/ssb-refs v0.1.1-0.20210108133850-cf1f44fea870 h1:TCI3AefMAaOYECvppn30+CfEB0Fn8IES1SKvvacc3/c=
go.mindeco.de/ssb-refs v0.1.1-0.20210108133850-cf1f44fea870/go.mod h1:OnBnV02ux4lLsZ39LID6yYLqSDp+dqTHb/3miYPkQFs=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=

View File

@ -59,6 +59,7 @@ func newSession(t *testing.T) *testSession {
render.SetLogger(log),
render.BaseTemplates("base.tmpl"),
render.AddTemplates(append(HTMLTemplates, "error.tmpl")...),
render.ErrorTemplate("error.tmpl"),
render.FuncMap(testFuncs),
)
if err != nil {

View File

@ -57,6 +57,7 @@ func New(
roomsAuth.HTMLTemplates,
admin.HTMLTemplates,
)...),
render.ErrorTemplate("error.tmpl"),
render.FuncMap(web.TemplateFuncs(m)),
// TODO: move these to the i18n helper pkg
render.InjectTemplateFunc("i18npl", func(r *http.Request) interface{} {

View File

@ -36,6 +36,7 @@ func newSession(t *testing.T) *testSession {
render.SetLogger(log),
render.BaseTemplates("base.tmpl"),
render.AddTemplates(append(HTMLTemplates, "error.tmpl")...),
render.ErrorTemplate("error.tmpl"),
render.FuncMap(testFuncs),
)
if err != nil {