diff --git a/server/server.go b/server/server.go index ff3f75b..f91c342 100644 --- a/server/server.go +++ b/server/server.go @@ -39,9 +39,11 @@ func New(deps Dependencies) *Server { r.Get("/", s.handleIndex) r.Get("/dosages.json", s.getDosagesJSON) - r.Post("/notify/test", s.handleGotifyTest) - r.Post("/dosage/record", s.handleRecordDosage) - r.Post("/dosage/delete", s.handleDeleteDosage) + r.Route("/api", func(r chi.Router) { + r.Post("/notify/test", s.handleGotifyTest) + r.Post("/dosage/record", s.handleRecordDosage) + r.Post("/dosage/delete", s.handleDeleteDosage) + }) r.Route("/static", func(r chi.Router) { r.Use(middleware.Compress(5)) diff --git a/web/pages/index.html b/web/pages/index.html index e367b4f..dd8cc47 100644 --- a/web/pages/index.html +++ b/web/pages/index.html @@ -48,14 +48,14 @@