From e7e70811cbdee2cc724a8ee862892bf742fab029 Mon Sep 17 00:00:00 2001 From: Alex Klarfeld Date: Mon, 25 Sep 2023 11:32:56 -0700 Subject: [PATCH] Updated endpoint --- src/constants.ts | 6 +++--- src/test/core.int.test.ts | 4 ++-- src/types.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index c117d73..a2e266f 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,7 +1,7 @@ const defaultConfig = { flushInterval: 1000, - eventSinkEndpoint: '/api/events', - errorSinkEndpoint: '/api/errors', + eventSinkEndpoint: '/events', + errorSinkEndpoint: '/errors', keysToHash: [], ignoredDomains: [], allowedDomains: [], @@ -27,7 +27,7 @@ const errors = { 'No Client Secret Provided, set SUPERGOOD_CLIENT_SECRET or pass it as an argument' }; -const TestErrorPath = '/api/supergood-test-error'; +const TestErrorPath = '/supergood-test-error'; const LocalClientId = 'local-client-id'; const LocalClientSecret = 'local-client-secret'; diff --git a/src/test/core.int.test.ts b/src/test/core.int.test.ts index fc9ea18..318a0da 100644 --- a/src/test/core.int.test.ts +++ b/src/test/core.int.test.ts @@ -44,8 +44,8 @@ const INTERNAL_SUPERGOOD_SERVER = `http://localhost:${SUPERGOOD_SERVER_PORT}`; const defaultConfig = { flushInterval: 30000, cacheTtl: 0, - eventSinkEndpoint: `/api/events`, - errorSinkEndpoint: `/api/errors`, + eventSinkEndpoint: `/events`, + errorSinkEndpoint: `/errors`, keysToHash: ['request.body', 'response.body'], ignoredDomains: [] }; diff --git a/src/types.ts b/src/types.ts index e2ba469..9008334 100644 --- a/src/types.ts +++ b/src/types.ts @@ -36,8 +36,8 @@ interface ConfigType { allowedDomains: string[]; cacheTtl: number; keysToHash: string[]; - eventSinkEndpoint: string; // Defaults to {baseUrl}/api/events if not provided - errorSinkEndpoint: string; // Defaults to {baseUrl}/api/errors if not provided + eventSinkEndpoint: string; // Defaults to {baseUrl}/events if not provided + errorSinkEndpoint: string; // Defaults to {baseUrl}/errors if not provided waitAfterClose: number; }