Skip to content

Commit

Permalink
simplify grantType
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasridd committed Feb 19, 2024
1 parent 925925d commit 04a1bbc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/mappers/baseClientApi/getBaseClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { GetBaseClientResponse } from '../../interfaces/baseClientApi/baseClientResponse'
import { BaseClient, DeploymentDetails } from '../../interfaces/baseClientApi/baseClient'
import { GrantTypes } from '../../data/enums/grantTypes'
import { ClientType } from '../../data/enums/clientTypes'
import { HostingType } from '../../data/enums/hostingTypes'
import { snake } from '../../utils/utils'
Expand All @@ -10,10 +9,7 @@ export default (response: GetBaseClientResponse): BaseClient => {
baseClientId: response.clientId,
accessTokenValidity: response.accessTokenValidityMinutes ? response.accessTokenValidityMinutes * 60 : 0,
scopes: response.scopes ? response.scopes : [],
grantType:
snake(response.grantType) === GrantTypes.ClientCredentials
? GrantTypes.ClientCredentials
: GrantTypes.AuthorizationCode,
grantType: snake(response.grantType),
audit: response.jiraNumber ? response.jiraNumber : '',
count: 1,
clientCredentials: {
Expand Down

0 comments on commit 04a1bbc

Please sign in to comment.