Skip to content

Commit 63fb2dc

Browse files
committed
cleaner
1 parent e77e971 commit 63fb2dc

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

premium/usage.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func NewUsageClient(meta plugin.Meta, ops ...UsageClientOptions) (UsageClient, e
285285
}
286286
u.teamName = teamName
287287
}
288-
u.installationID = determineInstallationID(u.tokenClient.GetTokenType())
288+
u.installationID = determineInstallationID()
289289

290290
u.backgroundUpdater()
291291

@@ -728,13 +728,8 @@ func (u *BatchUpdater) getTeamNameByTokenType(tokenType auth.TokenType) (string,
728728
}
729729
}
730730

731-
func determineInstallationID(tokenType auth.TokenType) string {
732-
switch tokenType {
733-
case auth.APIKey:
734-
return os.Getenv("_CQ_INSTALLATION_ID")
735-
default:
736-
return ""
737-
}
731+
func determineInstallationID() string {
732+
return os.Getenv("_CQ_INSTALLATION_ID")
738733
}
739734

740735
type NoOpUsageClient struct {

0 commit comments

Comments
 (0)