MSP-8394 Remove dead code
This commit is contained in:
1 parent
484b669438
commit
8f6af4b871
3 files changed
+6
-12
No files matched your search
+6
-2
@@ -51,8 +51,12 @@ func (l Locator) Config(cfg conf.Remote) Config {
|
|||||||
applicationService := service.NewApplication(txManager, applicationRep, appGroupRep, tokenRep)
|
applicationService := service.NewApplication(txManager, applicationRep, appGroupRep, tokenRep)
|
||||||
|
|
||||||
jwtService := service.NewTokenSource()
|
jwtService := service.NewTokenSource()
|
||||||
tokenService := service.NewToken(jwtService, applicationService, txManager,
|
tokenService := service.NewToken(
|
||||||
applicationRep, appGroupRep, tokenRep,
|
jwtService,
|
||||||
|
applicationService,
|
||||||
|
txManager,
|
||||||
|
applicationRep,
|
||||||
|
tokenRep,
|
||||||
)
|
)
|
||||||
|
|
||||||
secureController := controller.NewSecure(secureService)
|
secureController := controller.NewSecure(secureService)
|
||||||
|
|||||||
@@ -64,13 +64,6 @@ func (c Token) Create(ctx context.Context, req domain.TokenCreateRequest) (*doma
|
|||||||
fmt.Sprintf("application with id %d not found", req.AppId),
|
fmt.Sprintf("application with id %d not found", req.AppId),
|
||||||
err,
|
err,
|
||||||
)
|
)
|
||||||
case errors.Is(err, domain.ErrAppGroupNotFound):
|
|
||||||
return nil, apierrors.New(
|
|
||||||
codes.NotFound,
|
|
||||||
domain.ErrCodeAppGroupNotFound,
|
|
||||||
fmt.Sprintf("service for app_id id %d not found", req.AppId),
|
|
||||||
err,
|
|
||||||
)
|
|
||||||
case err != nil:
|
case err != nil:
|
||||||
return nil, err
|
return nil, err
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ type Token struct {
|
|||||||
appEnricher AppEnricher
|
appEnricher AppEnricher
|
||||||
tx TokenTxRunner
|
tx TokenTxRunner
|
||||||
appRepo ApplicationRepo
|
appRepo ApplicationRepo
|
||||||
serviceRepo AppGroupRepo
|
|
||||||
tokenRepo TokenRepo
|
tokenRepo TokenRepo
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,7 +43,6 @@ func NewToken(
|
|||||||
appEnricher AppEnricher,
|
appEnricher AppEnricher,
|
||||||
tx TokenTxRunner,
|
tx TokenTxRunner,
|
||||||
appRepo ApplicationRepo,
|
appRepo ApplicationRepo,
|
||||||
appGroupRepo AppGroupRepo,
|
|
||||||
tokenRepo TokenRepo,
|
tokenRepo TokenRepo,
|
||||||
) Token {
|
) Token {
|
||||||
return Token{
|
return Token{
|
||||||
@@ -52,7 +50,6 @@ func NewToken(
|
|||||||
jwt: jwtGenerate,
|
jwt: jwtGenerate,
|
||||||
tx: tx,
|
tx: tx,
|
||||||
appRepo: appRepo,
|
appRepo: appRepo,
|
||||||
serviceRepo: appGroupRepo,
|
|
||||||
tokenRepo: tokenRepo,
|
tokenRepo: tokenRepo,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user