diff --git a/server/src/models/v2/Organisation.js b/server/src/models/v2/Organisation.js index 457b20aa1..2d16b142e 100644 --- a/server/src/models/v2/Organisation.js +++ b/server/src/models/v2/Organisation.js @@ -28,7 +28,7 @@ const definition = defaultDefinition const dbDefinition = definition.tailor('db') // internal -> external -const externalDefintion = definition.tailor('external') +const externalDefinition = definition.tailor('external') // database -> internal const parseDatabaseJson = createDefaultValidator(definition) @@ -40,7 +40,7 @@ module.exports = { def: definition, definition, dbDefinition, - externalDefintion, + externalDefinition, parseDatabaseJson, formatDatabaseJson, } diff --git a/server/src/routes/v2/organisations.js b/server/src/routes/v2/organisations.js index c00aafb36..7a94e6fce 100644 --- a/server/src/routes/v2/organisations.js +++ b/server/src/routes/v2/organisations.js @@ -18,7 +18,7 @@ module.exports = [ response: { schema: Joi.array() .items( - OrgModel.externalDefintion.fork('users', s => + OrgModel.externalDefinition.fork('users', s => s.forbidden() ) ) @@ -68,7 +68,7 @@ module.exports = [ }, tags: ['api', 'v2'], response: { - schema: OrgModel.externalDefintion.label( + schema: OrgModel.externalDefinition.label( 'OrganisationWithUsers' ), },