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,20 +130,9 @@ func newApp(l *zap.Logger, v *viper.Viper) *App {
|
|||
l.Fatal("could not prepare ObjectLayer", zap.Error(err))
|
||||
}
|
||||
|
||||
{ // should prepare api.Handler:
|
||||
ctx, cancel := context.WithTimeout(context.Background(), conTimeout)
|
||||
defer cancel()
|
||||
|
||||
apiParams := handler.Params{
|
||||
Log: l,
|
||||
Cli: cli,
|
||||
Key: key,
|
||||
}
|
||||
|
||||
if caller, err = handler.New(ctx, apiParams); err != nil {
|
||||
if caller, err = handler.New(l, obj); err != nil {
|
||||
l.Fatal("could not initialize API handler", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
||||
return &App{
|
||||
center: center,
|
||||
|
|
Loading…
Reference in a new issue