Skip to content

Commit

Permalink
change put/post grantType requests to snake case (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasridd authored Feb 23, 2024
1 parent f4cfd6d commit daf41ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/mappers/baseClientApi/addBaseClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseClient } from '../../interfaces/baseClientApi/baseClient'
import { AddBaseClientRequest } from '../../interfaces/baseClientApi/baseClientRequestBody'
import { daysRemaining, snakeUpper } from '../../utils/utils'
import { daysRemaining } from '../../utils/utils'

export default (baseClient: BaseClient): AddBaseClientRequest => {
return {
Expand All @@ -12,7 +12,7 @@ export default (baseClient: BaseClient): AddBaseClientRequest => {
databaseUserName: baseClient.clientCredentials.databaseUserName,
validDays: baseClient.config.expiryDate ? daysRemaining(baseClient.config.expiryDate) : null,
accessTokenValidityMinutes: baseClient.accessTokenValidity ? baseClient.accessTokenValidity / 60 : null,
grantType: snakeUpper(baseClient.grantType),
grantType: baseClient.grantType,
mfa: baseClient.authorisationCode.mfa,
mfaRememberMe: baseClient.authorisationCode.mfaRememberMe,
jwtFields: baseClient.authorisationCode.jwtFields,
Expand Down
4 changes: 2 additions & 2 deletions server/mappers/baseClientApi/updateBaseClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseClient } from '../../interfaces/baseClientApi/baseClient'
import { UpdateBaseClientRequest } from '../../interfaces/baseClientApi/baseClientRequestBody'
import { daysRemaining, snakeUpper } from '../../utils/utils'
import { daysRemaining } from '../../utils/utils'

export default (baseClient: BaseClient): UpdateBaseClientRequest => {
return {
Expand All @@ -11,7 +11,7 @@ export default (baseClient: BaseClient): UpdateBaseClientRequest => {
databaseUserName: baseClient.clientCredentials.databaseUserName,
validDays: baseClient.config.expiryDate ? daysRemaining(baseClient.config.expiryDate) : null,
accessTokenValidityMinutes: baseClient.accessTokenValidity ? baseClient.accessTokenValidity / 60 : null,
grantType: snakeUpper(baseClient.grantType),
grantType: baseClient.grantType,
mfa: baseClient.authorisationCode.mfa,
mfaRememberMe: baseClient.authorisationCode.mfaRememberMe,
jwtFields: baseClient.authorisationCode.jwtFields,
Expand Down

0 comments on commit daf41ef

Please sign in to comment.