Use admin Route function

This commit is contained in:
Mariano Cano 2022-04-27 12:16:16 -07:00
parent 8bd4e1d73e
commit 439cb81b13

View file

@ -221,9 +221,8 @@ func (ca *CA) Init(cfg *config.Config) (*CA, error) {
adminDB := auth.GetAdminDatabase() adminDB := auth.GetAdminDatabase()
if adminDB != nil { if adminDB != nil {
acmeAdminResponder := adminAPI.NewACMEAdminResponder() acmeAdminResponder := adminAPI.NewACMEAdminResponder()
adminHandler := adminAPI.NewHandler(auth, adminDB, acmeDB, acmeAdminResponder)
mux.Route("/admin", func(r chi.Router) { mux.Route("/admin", func(r chi.Router) {
adminHandler.Route(r) adminAPI.Route(r, acmeAdminResponder)
}) })
} }
} }