diff --git a/.source b/.source index e5137b561f6..b8fb33ddb1d 160000 --- a/.source +++ b/.source @@ -1 +1 @@ -Subproject commit e5137b561f621466afb53c50dfa16e6389b61215 +Subproject commit b8fb33ddb1dc2159e698da51890efc2e9dda6895 diff --git a/apps/api/src/.env.test b/apps/api/src/.env.test index 7846f973d52..db7b73b1f94 100644 --- a/apps/api/src/.env.test +++ b/apps/api/src/.env.test @@ -116,4 +116,4 @@ CLERK_PEM_PUBLIC_KEY= TUNNEL_BASE_ADDRESS=example.com API_ROOT_URL=http://localhost:1337 PLAIN_SUPPORT_KEY='PLAIN_SUPPORT_KEY' -NOVU_SECRET_KEY=test +NOVU_INTERNAL_SECRET_KEY=test diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index daa424318a1..39d2273a7e0 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -2,7 +2,7 @@ import { DynamicModule, Logger, Module, Provider } from '@nestjs/common'; import { APP_INTERCEPTOR } from '@nestjs/core'; import { ProfilingModule, TracingModule } from '@novu/application-generic'; -import { NovuModule } from '@novu/framework/nest'; +import { Client, NovuModule } from '@novu/framework/nest'; import { Type } from '@nestjs/common/interfaces/type.interface'; import { ForwardReference } from '@nestjs/common/interfaces/modules/forward-reference.interface'; @@ -157,6 +157,11 @@ if (process.env.NODE_ENV === 'test') { modules.push( NovuModule.register({ apiPath: '/api/novu', + client: new Client({ + secretKey: process.env.NOVU_INTERNAL_SECRET_KEY, + strictAuthentication: + process.env.NODE_ENV === 'production' || process.env.NOVU_STRICT_AUTHENTICATION_ENABLED === 'true', + }), controllerDecorators: [ApiExcludeController()], workflows: [usageLimitsWorkflow], })