-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
to src/team/certification-center-membership
- Loading branch information
1 parent
a076f53
commit 4263f75
Showing
5 changed files
with
45 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...team/application/certification-center-membership/certification-center-membership.route.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import Joi from 'joi'; | ||
|
||
import { securityPreHandlers } from '../../../shared/application/security-pre-handlers.js'; | ||
import { identifiersType } from '../../../shared/domain/types/identifiers-type.js'; | ||
import { certificationCenterMembershipController } from './certification-center-membership.controller.js'; | ||
|
||
export const certificationCenterMembershipRoute = [ | ||
{ | ||
method: 'GET', | ||
path: '/api/certification-centers/{certificationCenterId}/members', | ||
config: { | ||
pre: [ | ||
{ | ||
method: securityPreHandlers.checkUserIsMemberOfCertificationCenter, | ||
assign: 'isMemberOfCertificationCenter', | ||
}, | ||
], | ||
validate: { | ||
params: Joi.object({ | ||
certificationCenterId: identifiersType.certificationCenterId, | ||
}), | ||
}, | ||
handler: (request, h) => certificationCenterMembershipController.findCertificationCenterMemberships(request, h), | ||
notes: [ | ||
'- **Cette route est restreinte aux utilisateurs appartenant à un centre de certification**\n' + | ||
"- Récupération de tous les membres d'un centre de certification.\n", | ||
], | ||
tags: ['api', 'team', 'certification-center', 'members'], | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters