Skip to content

Commit

Permalink
Introduce findByCrn path and route
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Liburd committed Jan 30, 2025
1 parent 0c7d9a0 commit 9f5808f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion server/paths/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const paths = {
applicationOrigin: applicationsPath.path('application-type'),
selectApplicationOrigin: applicationsPath.path('select-application-origin'),
people: {
find: peoplePath.path('find'),
findByPrisonNumber: peoplePath.path('find-by-prison-number'),
findByCrn: peoplePath.path('find-by-crn'),
},
show: singleApplicationPath,
overview: singleApplicationPath.path('overview'),
Expand Down
9 changes: 7 additions & 2 deletions server/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ export default function routes(controllers: Controllers, services: Services): Ro

const { peopleController } = controllers

post(paths.applications.people.find.pattern, peopleController.findByPrisonNumber(), {
auditEvent: 'FIND_APPLICATION_PERSON',
post(paths.applications.people.findByPrisonNumber.pattern, peopleController.findByPrisonNumber(), {
auditEvent: 'FIND_APPLICATION_PERSON_BY_PRISON_NUMBER',
auditBodyParams: ['prisonNumber'],
})

post(paths.applications.people.findByCrn.pattern, peopleController.findByCrn(), {
auditEvent: 'FIND_APPLICATION_PERSON_BY_CRN',
auditBodyParams: ['crn'],
})

applyRoutes(controllers, router, services)
assessRoutes(controllers, router, services)
reportRoutes(controllers, router, services)
Expand Down

0 comments on commit 9f5808f

Please sign in to comment.