Skip to content

Commit

Permalink
feat(cb2-13886): repair uri decoding on archive endpoint (#160)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Searle <84069850+Daniel-Searle@users.noreply.github.com>
Co-authored-by: Daniel Searle <daniel.searle1@dvsa.gov.uk>
Co-authored-by: Leo <leo.ginever@bjss.com>
  • Loading branch information
4 people authored Sep 26, 2024
1 parent 2363f80 commit f8d99d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/handler/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayPr

const body: ArchiveRecordRequestBody = JSON.parse(event.body as string) as ArchiveRecordRequestBody;

const systemNumber = event?.pathParameters?.systemNumber ?? '';
const createdTimestamp = event?.pathParameters?.createdTimestamp ?? '';
const systemNumber = decodeURIComponent(event?.pathParameters?.systemNumber ?? '');
const createdTimestamp = decodeURIComponent(event?.pathParameters?.createdTimestamp ?? '');
const userDetails = getUserDetails(event.headers.Authorization ?? '');

logger.debug(`Get from database with systemNumber ${systemNumber} and timestamp ${createdTimestamp}`);
Expand Down
4 changes: 3 additions & 1 deletion src/handler/loadBatchPlate.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {
S3Client, GetObjectCommand, CopyObjectCommand, DeleteObjectCommand,
CopyObjectCommand, DeleteObjectCommand,
GetObjectCommand,
S3Client,
} from '@aws-sdk/client-s3';
import { SQSClient, SendMessageCommand } from '@aws-sdk/client-sqs';
import { S3Event } from 'aws-lambda';
Expand Down

0 comments on commit f8d99d0

Please sign in to comment.