From 04a155ad853c4b74898e7fe056130faa036f1641 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Mon, 31 Jul 2023 21:41:36 +0100 Subject: [PATCH] chore: remove extra code and lint --- src/helpers/rekognition.ts | 8 ++------ src/pages/api/biometric/index.ts | 7 ++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/helpers/rekognition.ts b/src/helpers/rekognition.ts index 412164bb..82fff14f 100644 --- a/src/helpers/rekognition.ts +++ b/src/helpers/rekognition.ts @@ -1,11 +1,7 @@ -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 { @@ -13,7 +9,7 @@ export async function getRekognitionClient( const credentials = await SSR.Credentials.get(); const rekognitionClient = new Rekognition({ - region: awsExports.aws_project_region, + region: 'us-east1', credentials, }); diff --git a/src/pages/api/biometric/index.ts b/src/pages/api/biometric/index.ts index 9983ce42..f7db165d 100644 --- a/src/pages/api/biometric/index.ts +++ b/src/pages/api/biometric/index.ts @@ -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);