feat: Add Cognito user pool name parameter and update API handlers to include CORS headers
This commit is contained in:
@@ -41,13 +41,19 @@ export const handler = async (event: any): Promise<any> => {
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
body: JSON.stringify(teamsWithUsernames),
|
||||
};
|
||||
} catch (error: any) {
|
||||
return {
|
||||
statusCode: 500,
|
||||
headers: { "Content-Type": "application/json" },
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
message: `Error retrieving teams: ${error.message}`,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user