diff --git a/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.ts b/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.ts index 38bf8b4e58..7eafa03e18 100644 --- a/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.ts +++ b/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.ts @@ -653,54 +653,6 @@ export class ExperimentClientController { }); } - - /** - * @swagger - * /log/caliper: - * post: - * description: Post Caliper format log data - * consumes: - * - application/json - * parameters: - * - in: body - * name: data - * required: true - * description: User Document - * tags: - * - Client Side SDK - * produces: - * - application/json - * responses: - * '200': - * description: Log data - * '500': - * description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint - */ - @Post('log/caliper') - public async caliperLog( - @Body({ validate: { validationError: { target: false, value: false } } }) - @Req() - request: AppRequest, - envelope: CaliperLogEnvelope - ): Promise { - let result = envelope.data.map(async log => { - // getOriginalUserDoc call for alias - const experimentUserDoc = await this.getUserDoc(log.object.assignee.id, request.logger); - if (experimentUserDoc) { - // append userDoc in logger - request.logger.child({ userDoc: experimentUserDoc }); - request.logger.info({ message: 'Got the original user doc' }); - } - return this.experimentAssignmentService.caliperDataLog(log, { - logger: request.logger, - userDoc: experimentUserDoc, - }); - }); - - const logsToReturn = await Promise.all(result); - return flatten(logsToReturn); - } - /** * @swagger * /log/caliper: diff --git a/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.v1.ts b/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.v1.ts index cb5af4eaa7..1b90d8ec90 100644 --- a/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.v1.ts +++ b/backend/packages/Upgrade/src/api/controllers/ExperimentClientController.v1.ts @@ -612,53 +612,6 @@ export class ExperimentClientController { }); } - /** - * @swagger - * /log/caliper: - * post: - * description: Post Caliper format log data - * consumes: - * - application/json - * parameters: - * - in: body - * name: data - * required: true - * description: User Document - * tags: - * - Client Side SDK - * produces: - * - application/json - * responses: - * '200': - * description: Log data - * '500': - * description: null value in column "id\" of relation \"experiment_user\" violates not-null constraint - */ - @Post('log/caliper') - public async caliperLog( - @Body({ validate: { validationError: { target: false, value: false } } }) - @Req() - request: AppRequest, - envelope: CaliperLogEnvelope - ): Promise { - let result = envelope.data.map(async log => { - // getOriginalUserDoc call for alias - const experimentUserDoc = await this.getUserDoc(log.object.assignee.id, request.logger); - if (experimentUserDoc) { - // append userDoc in logger - request.logger.child({ userDoc: experimentUserDoc }); - request.logger.info({ message: 'Got the original user doc' }); - } - return this.experimentAssignmentService.caliperDataLog(log, { - logger: request.logger, - userDoc: experimentUserDoc, - }); - }); - - const logsToReturn = await Promise.all(result); - return flatten(logsToReturn); - } - /** * @swagger * /log/caliper: