From 575e39eb350d3d639ed44889069aceed2c5316b1 Mon Sep 17 00:00:00 2001 From: Daniel Truong Date: Fri, 31 May 2024 16:48:06 +0000 Subject: [PATCH] NOBUG: adding dynamodb to permissionUtil --- lambda/permissionUtil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda/permissionUtil.js b/lambda/permissionUtil.js index a4ba843d..becc1ecc 100644 --- a/lambda/permissionUtil.js +++ b/lambda/permissionUtil.js @@ -9,7 +9,7 @@ const INVALID_TOKEN = { data: null }; const { logger } = require('./logger'); -const { runQuery, TABLE_NAME } = require('./dynamoUtil'); +const { runQuery, dynamodb, TABLE_NAME } = require('./dynamoUtil'); const { CustomError } = require('./responseUtil'); exports.decodeJWT = async function (event) { @@ -54,7 +54,7 @@ exports.getExpiryTime = function (token) { try { // grab the public stuff from jwt const decodedJWT = jwt.decode(token); - if (decodedJWT && decodedJWT.iat) { + if (decodedJWT && decodedJWT.iat) { const expiryTime = decodedJWT.exp; //Return the unix value of the epiry return expiryTime;