Skip to content

Commit

Permalink
request measurements as api user for the standards page
Browse files Browse the repository at this point in the history
  • Loading branch information
mauberti-bc committed Sep 18, 2024
1 parent bc5663e commit 455d968
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/src/paths/standards/taxon/{tsn}/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { RequestHandler } from 'express';
import { Operation } from 'express-openapi';
import { getDBConnection } from '../../../../database/db';
import { getAPIUserDBConnection } from '../../../../database/db';
import { StandardsService } from '../../../../services/standards-service';
import { getLogger } from '../../../../utils/logger';

Expand Down Expand Up @@ -185,9 +185,7 @@ GET.apiDoc = {
*/
export function getSpeciesStandards(): RequestHandler {
return async (req, res) => {
// API user DB connection does not work, possible because user does not exist in Critterbase?
// const connection = getAPIUserDBConnection();
const connection = getDBConnection(req.keycloak_token);
const connection = getAPIUserDBConnection();

try {
const tsn = Number(req.params.tsn);
Expand Down

0 comments on commit 455d968

Please sign in to comment.