refactor: move handler register to apps

This commit is contained in:
Jon Lundy committed 2022-08-19 13:57:07 -06:00
1 parent 814c974e93
commit 0a964cb631
5 files changed
+43 -88

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ var upgrader = websocket.Upgrader{
},
}
func (s *service) RegisterHTTP(mux *http.ServeMux) {
mux.Handle("/inbox/", logz.Htrace(http.StripPrefix("/inbox/", s), "inbox"))
}
func (s *service) ServeHTTP(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
ctx, span := logz.Span(ctx)