From 8bf5084803fe50a5997b3d879725f9f7e4dd05dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Lis=C3=A9?= Date: Fri, 28 Jan 2022 15:07:29 -0800 Subject: [PATCH] NOBUG: Fixing permission lookups. (#76) --- lambda/readFacility/index.js | 2 +- lambda/readPark/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lambda/readFacility/index.js b/lambda/readFacility/index.js index 24c66f89..428952fd 100644 --- a/lambda/readFacility/index.js +++ b/lambda/readFacility/index.js @@ -9,7 +9,7 @@ exports.handler = async (event, context) => { TableName: TABLE_NAME }; - const isAdmin = await checkPermissions(event); + const isAdmin = (await checkPermissions(event)).decoded; console.log('isAdmin:', isAdmin); try { diff --git a/lambda/readPark/index.js b/lambda/readPark/index.js index ec06cefe..a513536d 100644 --- a/lambda/readPark/index.js +++ b/lambda/readPark/index.js @@ -9,7 +9,7 @@ exports.handler = async (event, context) => { TableName: TABLE_NAME }; - const isAdmin = await checkPermissions(event); + const isAdmin = (await checkPermissions(event)).decoded; console.log('isAdmin:', isAdmin); try {