From df0f090c9332373dd36c412c76efecde6c2c45c8 Mon Sep 17 00:00:00 2001 From: mythilytm Date: Fri, 8 Nov 2024 18:54:11 -0500 Subject: [PATCH] debug statements --- functions/completeTaskAssignment.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions/completeTaskAssignment.ts b/functions/completeTaskAssignment.ts index 2c8f64cf..d145e2a6 100644 --- a/functions/completeTaskAssignment.ts +++ b/functions/completeTaskAssignment.ts @@ -71,10 +71,16 @@ const closeTaskAssignment = async ( .tasks(event.taskSid) .fetch(); + console.log(`>>> Task Before: ${task.sid} attributes: ${JSON.stringify(task.attributes)}`); + await task.update({ attributes: event.finalTaskAttributes }); const completedTask = await task.update({ assignmentStatus: 'completed' }); + console.log( + `>>> Task After completing: ${completedTask.sid} attributes: ${JSON.stringify(completedTask.attributes)}`, + ); + return { type: 'success', completedTask } as const; } catch (err) { return { @@ -131,6 +137,8 @@ export const handler = TokenValidator( finalTaskAttributes: JSON.stringify({}), }); + console.log('>>> closeTaskAssignment Result:', result); + resolve(success(result)); } catch (err: any) { resolve(error500(err));