From b85e55649d9dffb0507ff25346ee85d573aa92d2 Mon Sep 17 00:00:00 2001 From: Linnea Myllynen Date: Thu, 27 Apr 2023 14:42:00 +0300 Subject: [PATCH] Add logging --- src/auth.js | 3 ++- src/index.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auth.js b/src/auth.js index a193c18..72deba7 100644 --- a/src/auth.js +++ b/src/auth.js @@ -52,12 +52,13 @@ module.exports.configurePassport = async (clientUrl) => { }, } ) + console.log('memberData.ageGroupId: ', memberData.ageGroupId) let ageGroup = 35 //Sudenpennut if (memberData.ageGroupId !== null) { ageGroup = memberData.ageGroupId } - + console.log('ageGroupId: ', ageGroup) scout.canMarkDone = !restrictedAgeGroups.includes(ageGroup) } catch (error) { console.log(error.name, error.message) diff --git a/src/index.js b/src/index.js index dfdfbd5..ded0d4e 100644 --- a/src/index.js +++ b/src/index.js @@ -161,6 +161,7 @@ const main = async () => { app.post('/task-entry', isLoggedIn, async (req, res) => { try { + console.log('Post task entry user: ', req.user) const data = req.body const status = data.completion_status data.user_guid = req.user.membernumber