diff --git a/api.planx.uk/modules/analytics/metabase/collection/controller.ts b/api.planx.uk/modules/analytics/metabase/collection/controller.ts index c621cb15fb..946a35f0e8 100644 --- a/api.planx.uk/modules/analytics/metabase/collection/controller.ts +++ b/api.planx.uk/modules/analytics/metabase/collection/controller.ts @@ -1,7 +1,7 @@ import { createCollectionIfDoesNotExist } from "./service.js"; import type { NewCollectionRequestHandler } from "./types.js"; -export const createCollectionIfDoesNotExistController: NewCollectionRequestHandler = +export const MetabaseCollectionsController: NewCollectionRequestHandler = async (_req, res) => { try { const params = res.locals.parsedReq.body; diff --git a/api.planx.uk/modules/analytics/routes.ts b/api.planx.uk/modules/analytics/routes.ts index f88633568d..3044e33890 100644 --- a/api.planx.uk/modules/analytics/routes.ts +++ b/api.planx.uk/modules/analytics/routes.ts @@ -5,7 +5,7 @@ import { logUserExitController, logUserResumeController, } from "./analyticsLog/controller.js"; -import { createCollectionIfDoesNotExistController } from "./metabase/collection/controller.js"; +import { MetabaseCollectionsController } from "./metabase/collection/controller.js"; import { createCollectionIfDoesNotExistSchema } from "./metabase/collection/types.js"; const router = Router(); @@ -23,7 +23,7 @@ router.post( router.post( "/collection", validate(createCollectionIfDoesNotExistSchema), - createCollectionIfDoesNotExistController, + MetabaseCollectionsController, ); export default router;