feat: Update environment variable naming and refactor image URL handling across the application
This commit is contained in:
@@ -1174,7 +1174,7 @@ export const handler = async () => {
|
||||
console.info(`Data population for table ${tableName} complete.`);
|
||||
}
|
||||
|
||||
console.log("Data population complete.");
|
||||
console.info("Data population complete.");
|
||||
} catch (error) {
|
||||
console.error("Failed to populate data:", error);
|
||||
}
|
||||
|
||||
@@ -10,10 +10,9 @@ const client = new DynamoDBClient({ region: SLS_REGION });
|
||||
const docClient = DynamoDBDocument.from(client);
|
||||
|
||||
export const handler = async (event: any): Promise<any> => {
|
||||
console.info(`Event: ${JSON.stringify(event)}`);
|
||||
const username =
|
||||
event.request.userAttributes["preferred_username"] || event.userName;
|
||||
const cognitoId = event.userName;
|
||||
const cognitoId = event.request.userAttributes["sub"];
|
||||
const teamId = await fetchRandomTeamId();
|
||||
|
||||
try {
|
||||
|
||||
@@ -17,13 +17,17 @@ export const handler = async (event: any): Promise<any> => {
|
||||
|
||||
const userTasks = [...authorTasks, ...assigneeTasks];
|
||||
|
||||
const uniqueTasks = Array.from(
|
||||
new Map(userTasks.map((task) => [task.taskId, task])).values()
|
||||
);
|
||||
|
||||
return {
|
||||
statusCode: 200,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
},
|
||||
body: JSON.stringify(userTasks),
|
||||
body: JSON.stringify(uniqueTasks),
|
||||
};
|
||||
} catch (error: any) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user