Update to new goprogram version
This commit is contained in:
parent
7bd9570bc0
commit
873fdcd5c2
106 changed files with 478 additions and 825 deletions
|
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
type API struct {
|
||||
component.Base
|
||||
Dependencies struct {
|
||||
dependencies struct {
|
||||
Auth *auth.Auth
|
||||
Resolver *Resolver
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ func (api *API) Routes() component.Routes {
|
|||
func (a *API) HandleRoute(ctx context.Context, path string) (http.Handler, error) {
|
||||
return &api.Handler[string]{
|
||||
Config: a.Config,
|
||||
Auth: a.Dependencies.Auth,
|
||||
Auth: a.dependencies.Auth,
|
||||
|
||||
Methods: []string{"GET"},
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ func (a *API) HandleRoute(ctx context.Context, path string) (http.Handler, error
|
|||
if uri == "" {
|
||||
return "", httpx.ErrBadRequest
|
||||
}
|
||||
target := a.Dependencies.Resolver.Target(uri)
|
||||
target := a.dependencies.Resolver.Target(uri)
|
||||
if target == "" {
|
||||
return "", httpx.ErrNotFound
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue