feat: add HTTP migration bridges and extensible API binding
This commit is contained in:
@@ -17,7 +17,7 @@ func RegisterRoutes(router openapi.Registrar, deps *servicecontext.Context) erro
|
||||
if deps.Middlewares["Auth"] == nil {
|
||||
return fmt.Errorf("missing middleware Auth")
|
||||
}
|
||||
h0 := h0.New(s0.New(deps))
|
||||
h0 := h0.New(s0.New(deps), deps)
|
||||
httpx.HandleWithResponse(router, "POST", "/api/v1/users", responseEncoder("", false), h0.CreateUser, deps.Middlewares["Auth"])
|
||||
httpx.HandleWithResponse(router, "GET", "/api/v1/users/:id", responseEncoder("", false), h0.GetUser, deps.Middlewares["Auth"])
|
||||
httpx.HandleWithResponse(router, "GET", "/api/v1/users", responseEncoder("", false), h0.ListUsers, deps.Middlewares["Auth"])
|
||||
|
||||
Reference in New Issue
Block a user