http response tooling written
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"ruben/inventory2/internal/domains/authentication"
|
||||
etsy_platform "ruben/inventory2/internal/domains/platforms/etsy"
|
||||
"ruben/inventory2/internal/domains/raw_events"
|
||||
"ruben/inventory2/internal/site/response"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
@@ -90,16 +91,16 @@ func NewServer(
|
||||
|
||||
// api routes
|
||||
|
||||
s.mux.HandleFunc("GET /login", s.loginPage)
|
||||
s.mux.HandleFunc("GET /login/callback", s.loginCallback)
|
||||
s.mux.HandleFunc("GET /logout", s.logoutPage)
|
||||
s.mux.Handle("POST /accounts", s.authenticate(http.HandlerFunc(s.createAccount)))
|
||||
s.mux.HandleFunc("GET /login", response.Handler(s.loginPage))
|
||||
s.mux.HandleFunc("GET /login/callback", response.Handler(s.loginCallback))
|
||||
s.mux.HandleFunc("GET /logout", response.Handler(s.logoutPage))
|
||||
s.mux.Handle("POST /accounts", response.Handler(s.authenticate(s.createAccount)))
|
||||
|
||||
// TODO: eliminate once no longer used.
|
||||
s.mux.HandleFunc("POST /login", s.login)
|
||||
s.mux.HandleFunc("POST /login", response.Handler(s.login))
|
||||
|
||||
// TODO: get rid of this, once we're confident this isn't needed...
|
||||
s.mux.Handle("GET /test-auth", s.authenticate(http.HandlerFunc(s.testAuthEndpoint)))
|
||||
s.mux.Handle("GET /test-auth", response.Handler(s.authenticate(s.testAuthEndpoint)))
|
||||
|
||||
// webpage content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user