Skip to content

Commit

Permalink
fixup! fix(credentials): add partnerId on getCredentialsRoles
Browse files Browse the repository at this point in the history
  • Loading branch information
jggrimal committed Oct 31, 2024
1 parent d7c7ae8 commit e6440a4
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ open class CredentialsServerService(
): OcpiResponseBody<Credentials> = OcpiResponseBody.of {
getCredentials(
serverToken = token,
partnerRepository.getPartnerIdByCredentialsServerToken(token)
?: throw OcpiClientInvalidParametersException("Invalid ServerToken ($token)"),
partnerId = partnerRepository.getPartnerIdByCredentialsServerToken(token)
?: partnerRepository.getPartnerIdByCredentialsTokenA(credentialsTokenA = token)
?: throw OcpiClientInvalidParametersException(
"Invalid token ($token) - should be either a TokenA or a ServerToken",
),
)
}

Expand Down

0 comments on commit e6440a4

Please sign in to comment.