From d2ffebd25881ef67ae5db9ad96f47c5ec79b7199 Mon Sep 17 00:00:00 2001 From: Nick Phura Date: Thu, 12 Dec 2024 10:27:38 -0800 Subject: [PATCH] Misc fix --- .../critters/{critterId}/deployments2/index.ts | 2 +- .../survey/{surveyId}/critters/{critterId}/index.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments2/index.ts b/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments2/index.ts index 3ae4b72625..43ecd041fa 100644 --- a/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments2/index.ts +++ b/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments2/index.ts @@ -7,7 +7,7 @@ import { TelemetryDeploymentService } from '../../../../../../../../services/tel import { getLogger } from '../../../../../../../../utils/logger'; import { numberOrNull } from '../../../../../../../../utils/string-utils'; -const defaultLog = getLogger('paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments'); +const defaultLog = getLogger('paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/deployments2'); export const POST: Operation = [ authorizeRequestHandler((req) => { diff --git a/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/index.ts b/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/index.ts index 05c7479330..21037369a6 100644 --- a/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/index.ts +++ b/api/src/paths/project/{projectId}/survey/{surveyId}/critters/{critterId}/index.ts @@ -5,9 +5,12 @@ import { getDBConnection } from '../../../../../../../database/db'; import { HTTP400, HTTPError, HTTPErrorType } from '../../../../../../../errors/http-error'; import { bulkUpdateResponse, critterBulkRequestObject } from '../../../../../../../openapi/schemas/critter'; import { authorizeRequestHandler } from '../../../../../../../request-handlers/security/authorization'; -import { getBctwUser } from '../../../../../../../services/bctw-service/bctw-service'; import { CritterAttachmentService } from '../../../../../../../services/critter-attachment-service'; -import { CritterbaseService, ICritterbaseUser } from '../../../../../../../services/critterbase-service'; +import { + CritterbaseService, + getCritterbaseUser, + ICritterbaseUser +} from '../../../../../../../services/critterbase-service'; import { SurveyCritterService } from '../../../../../../../services/survey-critter-service'; import { getLogger } from '../../../../../../../utils/logger'; @@ -95,7 +98,7 @@ export function updateSurveyCritter(): RequestHandler { const connection = getDBConnection(req.keycloak_token); try { await connection.open(); - const user = getBctwUser(req); + const user = getCritterbaseUser(req); if (!critterbaseCritterId) { throw new HTTPError(HTTPErrorType.BAD_REQUEST, 400, 'No external critter ID was found.');