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)
|
||||
|
||||
jwtService := service.NewTokenSource()
|
||||
tokenService := service.NewToken(jwtService, applicationService, txManager,
|
||||
applicationRep, appGroupRep, tokenRep,
|
||||
tokenService := service.NewToken(
|
||||
jwtService,
|
||||
applicationService,
|
||||
txManager,
|
||||
applicationRep,
|
||||
tokenRep,
|
||||
)
|
||||
|
||||
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),
|
||||
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:
|
||||
return nil, err
|
||||
default:
|
||||
|
||||
@@ -35,7 +35,6 @@ type Token struct {
|
||||
appEnricher AppEnricher
|
||||
tx TokenTxRunner
|
||||
appRepo ApplicationRepo
|
||||
serviceRepo AppGroupRepo
|
||||
tokenRepo TokenRepo
|
||||
}
|
||||
|
||||
@@ -44,7 +43,6 @@ func NewToken(
|
||||
appEnricher AppEnricher,
|
||||
tx TokenTxRunner,
|
||||
appRepo ApplicationRepo,
|
||||
appGroupRepo AppGroupRepo,
|
||||
tokenRepo TokenRepo,
|
||||
) Token {
|
||||
return Token{
|
||||
@@ -52,7 +50,6 @@ func NewToken(
|
||||
jwt: jwtGenerate,
|
||||
tx: tx,
|
||||
appRepo: appRepo,
|
||||
serviceRepo: appGroupRepo,
|
||||
tokenRepo: tokenRepo,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user