From 8f6af4b871a41eae7da1bbf21fd5984bbea90655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B8=D0=BD=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA=20?= =?UTF-8?q?=D0=A2=D0=B8=D0=BC=D1=83=D1=80=20=D0=A0=D0=BE=D0=BC=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=87?= Date: Wed, 23 Sep 2026 20:45:53 +0300 Subject: [PATCH] MSP-8394 Remove dead code --- assembly/locator.go | 8 ++++++-- controller/token.go | 7 ------- service/token.go | 3 --- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/assembly/locator.go b/assembly/locator.go index c6c487d..ea1a41a 100644 --- a/assembly/locator.go +++ b/assembly/locator.go @@ -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) diff --git a/controller/token.go b/controller/token.go index 521a797..e6ae5ea 100644 --- a/controller/token.go +++ b/controller/token.go @@ -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: diff --git a/service/token.go b/service/token.go index 1017691..64541e2 100644 --- a/service/token.go +++ b/service/token.go @@ -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, } }