Skip to content

Commit

Permalink
updated collaborator validation function name
Browse files Browse the repository at this point in the history
  • Loading branch information
ARADDCC002 committed Nov 25, 2024
1 parent 5d5e4f7 commit 540b126
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/services/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function createModel(user: UserInterface, modelParams: CreateModelP
const modelId = convertStringToId(modelParams.name)

if (modelParams.collaborators) {
await checkCollaboratorAuthorisation(modelParams.collaborators)
await validateCollaborators(modelParams.collaborators)
}

let collaborators: CollaboratorEntry[] = []
Expand Down Expand Up @@ -322,7 +322,7 @@ export async function updateModel(user: UserInterface, modelId: string, modelDif
throw BadReq('You cannot select both mirror settings simultaneously.')
}
if (modelDiff.collaborators) {
await checkCollaboratorAuthorisation(modelDiff.collaborators, model.collaborators)
await validateCollaborators(modelDiff.collaborators, model.collaborators)
}

const auth = await authorisation.model(user, model, ModelAction.Update)
Expand All @@ -342,7 +342,7 @@ export async function updateModel(user: UserInterface, modelId: string, modelDif
return model
}

export async function checkCollaboratorAuthorisation(
async function validateCollaborators(
updatedCollaborators: CollaboratorEntry[],
previousCollaborators: CollaboratorEntry[] = [],
) {
Expand Down

0 comments on commit 540b126

Please sign in to comment.