fix: add init func to s5 api

This commit is contained in:
Derrick Hammer 2024-01-28 02:51:35 -05:00
parent 55f515157d
commit f7057142eb
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 7 additions and 2 deletions

View File

@ -10,8 +10,9 @@ import (
func RegisterApis() {
registry.Register(registry.APIEntry{
Key: "s5",
Module: S5Module,
Key: "s5",
Module: S5Module,
InitFunc: InitS5Api,
})
}

View File

@ -61,6 +61,10 @@ func NewS5(params S5ApiParams) (S5ApiResult, error) {
}, nil
}
func InitS5Api(api *S5API) error {
return api.Init()
}
var S5Module = fx.Module("s5_api",
fx.Provide(NewS5),
fx.Provide(s5.NewHttpHandler),