Skip to content

Commit

Permalink
Misc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Dec 12, 2024
1 parent ff76ba0 commit d2ffebd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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.');
Expand Down

0 comments on commit d2ffebd

Please sign in to comment.