add 404 handler for admin

This commit is contained in:
sentriz
2019-08-21 15:04:40 +01:00
parent 7580835146
commit e7c98808bb
6 changed files with 19 additions and 7 deletions

No files matched your search

+1
View File
@@ -63,6 +63,7 @@ func (s *Server) SetupAdmin() error {
// begin public routes (creates session)
routPublic := s.router.PathPrefix("/admin").Subrouter()
routPublic.Use(ctrl.WithSession)
routPublic.NotFoundHandler = ctrl.H(ctrl.ServeNotFound)
routPublic.Handle("/login", ctrl.H(ctrl.ServeLogin))
routPublic.Handle("/login_do", ctrl.H(ctrl.ServeLoginDo))
assets.PrefixDo("static", func(path string, asset *assets.EmbeddedAsset) {