Skip to content

Commit

Permalink
Fix: [AEA-4034] - Sandbox returns 200 status code instead of 201 (#173)
Browse files Browse the repository at this point in the history
## Summary

🎫 [AEA-4034](https://nhsd-jira.digital.nhs.uk/browse/AEA-4034) Sandbox
returns 200 status code instead of 201

- Routine Change

### Details

The sandbox returns a 200 status code instead of 201.

---------

Co-authored-by: Tom Smith <[email protected]>
  • Loading branch information
kris-szlapa and TomSmithCoding authored Apr 29, 2024
1 parent 96cdcc4 commit 6dc40ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/sandbox/src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const logger = new Logger({serviceName: "sandbox"})

const lambdaHandler = async (): Promise<APIGatewayProxyResult> => {
return {
statusCode: 200,
statusCode: 201,
body: JSON.stringify(successData),
headers: {
"Content-Type": "application/fhir+json",
Expand Down
2 changes: 1 addition & 1 deletion packages/sandbox/tests/test-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Unit test for app handler", () => {
it("returns a success response", async () => {
const result: APIGatewayProxyResult = await handler(mockEvent, dummyContext)

expect(result.statusCode).toEqual(200)
expect(result.statusCode).toEqual(201)
expect(result.body).toEqual(JSON.stringify(successData))
})
it("returns a response with the correct MIME type", async () => {
Expand Down

0 comments on commit 6dc40ab

Please sign in to comment.