Skip to content

Commit

Permalink
Modification to get-buy-ins return format
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmonisit committed Oct 18, 2024
1 parent 2b08339 commit 7e3cbfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/functions/get-buy-ins/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const getBuyIns: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (even
statusCode: 200,
body: JSON.stringify({
statusCode: 200,
...result,
buyIns: result,
}),
};
} catch (error) {
Expand Down
3 changes: 1 addition & 2 deletions tests/get-buy-ins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ describe('get-buy-ins tests', () => {
};

const mockEvent = createEvent(userData, path, httpMethod);

const result = await main(mockEvent, mockContext, jest.fn());

expect(result.statusCode).toBe(200);
const body = JSON.parse(result.body);
expect(body.prizeA).toBe(30);
expect(body.buyIns.prizeA).toBe(30);
});
});

0 comments on commit 7e3cbfc

Please sign in to comment.