Remove other useless stuff

This commit is contained in:
Pavel Korotkov 2020-07-24 19:03:57 +03:00
parent de0a63a850
commit 309179e9ba

View file

@ -4,7 +4,6 @@ import (
"context" "context"
"net" "net"
"net/http" "net/http"
"os"
"time" "time"
"github.com/minio/minio/auth" "github.com/minio/minio/auth"
@ -18,7 +17,6 @@ import (
// should be removed in future // should be removed in future
"github.com/minio/minio/legacy" "github.com/minio/minio/legacy"
"github.com/minio/minio/legacy/config"
) )
type ( type (
@ -67,8 +65,6 @@ func newApp(l *zap.Logger, v *viper.Viper) *App {
if err != nil { if err != nil {
l.Fatal("failed to initialize auth center", zap.Error(err)) l.Fatal("failed to initialize auth center", zap.Error(err))
} }
uid := center.GetOwnerID()
wif := center.GetWIFString()
if caller, err = handler.New(); err != nil { if caller, err = handler.New(); err != nil {
l.Fatal("could not initialize API handler", zap.Error(err)) l.Fatal("could not initialize API handler", zap.Error(err))
@ -133,19 +129,9 @@ 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 { if obj, err = layer.NewLayer(l, cli, center); err != nil {
l.Fatal("could not prepare ObjectLayer", zap.Error(err)) l.Fatal("could not prepare ObjectLayer", zap.Error(err))
} }
}
return &App{ return &App{
center: center, center: center,