Skip to content

Commit

Permalink
chore: remove extra code and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavovalverde committed Jul 31, 2023
1 parent f3a4678 commit 04a155a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/helpers/rekognition.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { Amplify, withSSRContext } from 'aws-amplify';
import { withSSRContext } from 'aws-amplify';
import { Rekognition } from '@aws-sdk/client-rekognition';
import { NextApiRequest } from 'next/types';

import awsExports from '../aws-exports';

Amplify.configure({ ...awsExports, ssr: true });

export async function getRekognitionClient(
req: NextApiRequest
): Promise<Rekognition> {
const SSR = withSSRContext({ req });
const credentials = await SSR.Credentials.get();

const rekognitionClient = new Rekognition({
region: awsExports.aws_project_region,
region: 'us-east1',
credentials,
});

Expand Down
7 changes: 6 additions & 1 deletion src/pages/api/biometric/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ export default async function handler(
logger.warn(`Low similarity for citizen ${cedula}`);
return res
.status(200)
.end(JSON.stringify({ message: LIVENESS_NO_MATCH_ERROR, isMatch: false }));
.end(
JSON.stringify({
message: LIVENESS_NO_MATCH_ERROR,
isMatch: false,
})
);
}
} catch (error) {
logger.error(error);
Expand Down

0 comments on commit 04a155a

Please sign in to comment.