forked from TrueCloudLab/frostfs-s3-gw
Fixes for handler initialize
This commit is contained in:
parent
e223876d53
commit
26dda9ef2b
1 changed files with 2 additions and 13 deletions
|
@ -130,19 +130,8 @@ func newApp(l *zap.Logger, v *viper.Viper) *App {
|
||||||
l.Fatal("could not prepare ObjectLayer", zap.Error(err))
|
l.Fatal("could not prepare ObjectLayer", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // should prepare api.Handler:
|
if caller, err = handler.New(l, obj); err != nil {
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), conTimeout)
|
l.Fatal("could not initialize API handler", zap.Error(err))
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
apiParams := handler.Params{
|
|
||||||
Log: l,
|
|
||||||
Cli: cli,
|
|
||||||
Key: key,
|
|
||||||
}
|
|
||||||
|
|
||||||
if caller, err = handler.New(ctx, apiParams); err != nil {
|
|
||||||
l.Fatal("could not initialize API handler", zap.Error(err))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &App{
|
return &App{
|
||||||
|
|
Loading…
Reference in a new issue