Skip to content

Commit

Permalink
Renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
joshua-smee-ttd committed Jan 7, 2024
1 parent 5853811 commit 2a52503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/routers/participantsRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import {
} from '../services/adminServiceClient';
import { mapAdminApiKeysToApiKeyDTOs, SiteDTO } from '../services/adminServiceHelpers';
import {
checkApiRoles,
createdApiKeyToApiKeySecrets,
getApiRoles,
validateApiRoles,
} from '../services/apiKeyService';
import {
insertApproveAccountAuditTrail,
Expand Down Expand Up @@ -318,7 +318,7 @@ export function createParticipantsRouter() {
traceId
);

if (!checkApiRoles(apiRoles, participant)) {
if (!validateApiRoles(apiRoles, participant)) {
return res.status(400).send('Invalid api Roles');
}

Expand Down
2 changes: 1 addition & 1 deletion src/api/services/apiKeyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getApiRoles = async (participant: Participant) => {
return participantCurr.apiRoles;
};

export const checkApiRoles = async (
export const validateApiRoles = async (
keyRoles: string[],
participant: Participant
): Promise<boolean> => {
Expand Down

0 comments on commit 2a52503

Please sign in to comment.