From 309179e9ba580280345bc6f9a445c584478cdf60 Mon Sep 17 00:00:00 2001 From: Pavel Korotkov Date: Fri, 24 Jul 2020 19:03:57 +0300 Subject: [PATCH] Remove other useless stuff --- cmd/gate/app.go | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/cmd/gate/app.go b/cmd/gate/app.go index 11a793c9..0c99cafd 100644 --- a/cmd/gate/app.go +++ b/cmd/gate/app.go @@ -4,7 +4,6 @@ import ( "context" "net" "net/http" - "os" "time" "github.com/minio/minio/auth" @@ -18,7 +17,6 @@ import ( // should be removed in future "github.com/minio/minio/legacy" - "github.com/minio/minio/legacy/config" ) type ( @@ -67,8 +65,6 @@ func newApp(l *zap.Logger, v *viper.Viper) *App { if err != nil { l.Fatal("failed to initialize auth center", zap.Error(err)) } - uid := center.GetOwnerID() - wif := center.GetWIFString() if caller, err = handler.New(); err != nil { l.Fatal("could not initialize API handler", zap.Error(err)) @@ -133,18 +129,8 @@ func newApp(l *zap.Logger, v *viper.Viper) *App { } } - { // should prepare object layer - { // FIXME: Temporary solution, to resolve problems with MinIO GW access/secret keys: - if err = os.Setenv(config.EnvAccessKey, uid.String()); err != nil { - l.Fatal("could not set "+config.EnvAccessKey, zap.Error(err)) - } else if err = os.Setenv(config.EnvSecretKey, wif); err != nil { - l.Fatal("could not set "+config.EnvSecretKey, zap.Error(err)) - } - } - - if obj, err = layer.NewLayer(l, cli, center); err != nil { - l.Fatal("could not prepare ObjectLayer", zap.Error(err)) - } + if obj, err = layer.NewLayer(l, cli, center); err != nil { + l.Fatal("could not prepare ObjectLayer", zap.Error(err)) } return &App{