Skip to content

Commit a6eb6b0

Browse files
committed
refactoring
1 parent c3696c9 commit a6eb6b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/apiToken/ApiTokenService.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type ApiTokenServiceImpl struct {
4949
userService user2.UserService
5050
userAuditService user2.UserAuditService
5151
apiTokenRepository ApiTokenRepository
52-
tokenVariableConfig *TokenVariableConfig
52+
TokenVariableConfig *TokenVariableConfig
5353
}
5454

5555
func NewApiTokenServiceImpl(logger *zap.SugaredLogger,
@@ -70,7 +70,7 @@ func NewApiTokenServiceImpl(logger *zap.SugaredLogger,
7070
if err != nil {
7171
return nil, err
7272
}
73-
apiTokenService.tokenVariableConfig = cfg
73+
apiTokenService.TokenVariableConfig = cfg
7474

7575
return apiTokenService, nil
7676
}
@@ -130,7 +130,7 @@ func (impl ApiTokenServiceImpl) GetAllApiTokensForWebhook(projectName string, en
130130
ExpireAtInMs: &apiTokenFromDb.ExpireAtInMs,
131131
UpdatedAt: &updatedAtStr,
132132
}
133-
if !impl.tokenVariableConfig.HideApiTokens {
133+
if !impl.TokenVariableConfig.HideApiTokens {
134134
apiToken.Token = &apiTokenFromDb.Token
135135
}
136136
apiTokens = append(apiTokens, apiToken)
@@ -168,7 +168,7 @@ func (impl ApiTokenServiceImpl) GetAllActiveApiTokens() ([]*openapi.ApiToken, er
168168
ExpireAtInMs: &apiTokenFromDb.ExpireAtInMs,
169169
UpdatedAt: &updatedAtStr,
170170
}
171-
if !impl.tokenVariableConfig.HideApiTokens {
171+
if !impl.TokenVariableConfig.HideApiTokens {
172172
apiToken.Token = &apiTokenFromDb.Token
173173
}
174174
if latestAuditLog != nil {

0 commit comments

Comments
 (0)