diff --git a/server/paths/apply.ts b/server/paths/apply.ts index 10cdcad3..36d8ea91 100644 --- a/server/paths/apply.ts +++ b/server/paths/apply.ts @@ -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'), diff --git a/server/routes/index.ts b/server/routes/index.ts index 99f5360c..1ad17814 100644 --- a/server/routes/index.ts +++ b/server/routes/index.ts @@ -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)