@@ -268,27 +268,33 @@ const ticketsPlugin: FastifyPluginAsync = async (fastify, _options) => {
268268 Key : {
269269 stripe_pi : { S : ticketId } ,
270270 } ,
271- UpdateExpression : "SET scannerEmail = :scanner_email" ,
271+ UpdateExpression :
272+ "SET scannerEmail = :scanner_email, scanISOTimestamp = :scan_time" ,
272273 ConditionExpression : "email = :email_val" ,
273274 ExpressionAttributeValues : {
274275 ":scanner_email" : { S : request . username } ,
276+ ":scan_time" : { S : new Date ( ) . toISOString ( ) } ,
275277 ":email_val" : { S : request . body . email } ,
276278 } ,
277279 } ) ;
278280 break ;
281+
279282 case "ticket" :
280283 ticketId = request . body . ticketId ;
281284 command = new UpdateItemCommand ( {
282285 TableName : genericConfig . TicketPurchasesTableName ,
283286 Key : {
284287 ticket_id : { S : ticketId } ,
285288 } ,
286- UpdateExpression : "SET scannerEmail = :scanner_email" ,
289+ UpdateExpression :
290+ "SET scannerEmail = :scanner_email, scanISOTimestamp = :scan_time" ,
287291 ExpressionAttributeValues : {
288292 ":scanner_email" : { S : request . username } ,
293+ ":scan_time" : { S : new Date ( ) . toISOString ( ) } ,
289294 } ,
290295 } ) ;
291296 break ;
297+
292298 default :
293299 throw new ValidationError ( {
294300 message : `Unknown verification type!` ,
0 commit comments