From 61696ae1ceeeef6d93ceb493f0fa0626a470b339 Mon Sep 17 00:00:00 2001 From: naftis Date: Wed, 4 Dec 2024 17:07:27 +0200 Subject: [PATCH] feat: add the @opencrvs/mosip event registration handler --- package.json | 1 + src/index.ts | 3 ++- yarn.lock | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index de35fc4b0..3c1067fbb 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@hapi/boom": "^9.1.1", "@hapi/hapi": "^20.0.1", "@hapi/inert": "^6.0.3", + "@opencrvs/mosip": "^1.7.0-alpha.2", "@opencrvs/toolkit": "^0.0.5", "@types/chalk": "^2.2.0", "@types/csv2json": "^1.4.0", diff --git a/src/index.ts b/src/index.ts index 4b7f57228..21a77d6ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,6 +63,7 @@ import { fontsHandler } from './api/fonts/handler' import { certificateConfigurationHandler } from './api/certificate-configuration/handler' import { recordNotificationHandler } from './api/record-notification/handler' import { customEventHandler } from '@countryconfig/api/custom-event/handler' +import { mosipRegistrationHandler } from '@opencrvs/mosip' export interface ITokenPayload { sub: string @@ -414,7 +415,7 @@ export async function createServer() { server.route({ method: 'POST', path: '/event-registration', - handler: eventRegistrationHandler, + handler: mosipRegistrationHandler({ url: 'http://mosip-api:2024' }), options: { tags: ['api'], description: diff --git a/yarn.lock b/yarn.lock index 6d73f2987..52f0521d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -790,6 +790,13 @@ dependencies: "@octokit/openapi-types" "^18.0.0" +"@opencrvs/mosip@^1.7.0-alpha.2": + version "1.7.0-alpha.2" + resolved "https://registry.yarnpkg.com/@opencrvs/mosip/-/mosip-1.7.0-alpha.2.tgz#b3de70d993607142d739c7ada0c021b0d0f32b46" + integrity sha512-UiZUxuUiNGP/9CuQh1yPtmXmZTRAFiY4jQI2qlihCXZ8A0JbdXut2g3Dw3dRNvA9SvUnix1uuQpmWU/tAePWJA== + dependencies: + "@hapi/hapi" "^20.0.1" + "@opencrvs/toolkit@^0.0.5": version "0.0.5" resolved "https://registry.yarnpkg.com/@opencrvs/toolkit/-/toolkit-0.0.5.tgz#dbd3395b561c1eb3527b8cfc28b6e1dd301671f3"