Skip to content

Commit

Permalink
fix cors and error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
poojakedia committed Sep 16, 2024
1 parent d68a35a commit 2aec0fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/leaderboard/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const leaderboard: APIGatewayProxyHandler = async () => {
body: JSON.stringify(topPlayers),
};
} catch (error) {
console.error('Error creating user', error);
console.error('Error loading top 20', error);
return {
statusCode: 500,
body: JSON.stringify({
Expand Down
1 change: 1 addition & 0 deletions src/functions/leaderboard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
http: {
method: 'get',
path: 'leaderboard',
cors: true,
},
},
],
Expand Down

0 comments on commit 2aec0fb

Please sign in to comment.