fix: we need to pass out the api in both struct and interface form for fx to read it properly
This commit is contained in:
parent
10ecaebbf2
commit
ceabb95f6d
11
api/s5.go
11
api/s5.go
|
@ -45,19 +45,22 @@ type S5ApiParams struct {
|
|||
|
||||
type S5ApiResult struct {
|
||||
fx.Out
|
||||
Protocol registry.API `group:"api"`
|
||||
API registry.API `group:"api"`
|
||||
S5API *S5API
|
||||
}
|
||||
|
||||
func NewS5(params S5ApiParams) (S5ApiResult, error) {
|
||||
return S5ApiResult{
|
||||
Protocol: &S5API{
|
||||
api := &S5API{
|
||||
config: params.Config,
|
||||
identity: params.Identity,
|
||||
accounts: params.Accounts,
|
||||
storage: params.Storage,
|
||||
protocols: params.Protocols,
|
||||
httpHandler: params.HttpHandler,
|
||||
},
|
||||
}
|
||||
return S5ApiResult{
|
||||
API: api,
|
||||
S5API: api,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue