From aa8e0433370fc2782ce14c66d34f408f659e4f3b Mon Sep 17 00:00:00 2001 From: sentriz Date: Mon, 20 May 2019 15:36:01 +0100 Subject: [PATCH] update box paths --- server/setup_admin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/setup_admin.go b/server/setup_admin.go index 9f604f8..9422768 100644 --- a/server/setup_admin.go +++ b/server/setup_admin.go @@ -38,7 +38,7 @@ func (s *Server) setupAdmin() { s.SessDB = gormstore.New(s.DB, []byte(sessionKey)) go s.SessDB.PeriodicCleanup(1*time.Hour, nil) // using packr to bundle templates and static files - box := packr.New("templates", "templates") + box := packr.New("templates", "./templates") layoutT := extendFromBox(nil, box, "layout.tmpl") userT := extendFromBox(layoutT, box, "user.tmpl") s.Templates = map[string]*template.Template{ @@ -62,7 +62,7 @@ func (s *Server) setupAdmin() { withUserWare, s.WithAdminSession, ) - server := http.FileServer(packr.New("static", "static")) + server := http.FileServer(packr.New("static", "./static")) s.mux.Handle("/admin/static/", http.StripPrefix("/admin/static/", server)) s.mux.HandleFunc("/admin/login", withPublicWare(s.ServeLogin)) s.mux.HandleFunc("/admin/login_do", withPublicWare(s.ServeLoginDo))