diff --git a/pkg/router.go b/pkg/router.go index ff43332..77c0789 100644 --- a/pkg/router.go +++ b/pkg/router.go @@ -9,6 +9,7 @@ func NewRouter(db *Db) http.Handler { companyRouter.Handle("/tax-details", CompanyTaxDetailsHandler()) companyRouter.Handle("/tax/", CompanyTaxHandler()) companyRouter.Handle("/tax", CompanyTaxHandler()) + companyRouter.Handle("/profile", ProfileHandler()) companyRouter.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { mustRenderAppTemplate(w, r, "dashboard.html", nil) }) @@ -17,7 +18,6 @@ func NewRouter(db *Db) http.Handler { router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static")))) router.Handle("/login", LoginHandler()) router.Handle("/logout", Authenticated(LogoutHandler())) - router.Handle("/profile", Authenticated(ProfileHandler())) router.Handle("/company/", Authenticated(http.StripPrefix("/company/", CompanyHandler(companyRouter)))) router.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { user := getUser(r) diff --git a/web/template/app.html b/web/template/app.html index 47eb1f3..d6d270b 100644 --- a/web/template/app.html +++ b/web/template/app.html @@ -15,7 +15,7 @@