From 429c0a80be33389a4876381db4c68248b640e57a Mon Sep 17 00:00:00 2001 From: Linnea Myllynen Date: Thu, 27 Apr 2023 16:52:44 +0300 Subject: [PATCH] Remove logging --- src/auth.js | 5 ----- src/groups.js | 1 - src/index.js | 1 - src/profile.js | 1 - 4 files changed, 8 deletions(-) diff --git a/src/auth.js b/src/auth.js index 6ebc898..005e781 100644 --- a/src/auth.js +++ b/src/auth.js @@ -38,12 +38,10 @@ module.exports.configurePassport = async (clientUrl) => { lastname: profile.lastname, membernumber: profile.membernumber, } - console.log('Logging in - profile: ', profile) try { //TODO: Is there a way to not hard code these? const url = `${process.env.KUKSA}/members/${profile.membernumber}` - console.log('Kuksa URL: ', url) const restrictedAgeGroups = [4, 5, 6] //sudenpennut, seikkailijat, tarpojat const memberData = await request(url, { json: true, @@ -52,14 +50,11 @@ module.exports.configurePassport = async (clientUrl) => { pass: process.env.KUKSA_PASS, }, }) - console.log('membeData: ', memberData) - console.log('memberData.ageGroupId: ', memberData.age_groupId) let ageGroup = 4 //Sudenpennut if (memberData.age_groupId !== null) { ageGroup = memberData.age_groupId } - console.log('ageGroupId: ', ageGroup) scout.canMarkDone = !restrictedAgeGroups.includes(ageGroup) } catch (error) { console.log(error.name, error.message) diff --git a/src/groups.js b/src/groups.js index 4638268..3277d57 100644 --- a/src/groups.js +++ b/src/groups.js @@ -58,7 +58,6 @@ async function getAllGroups(userNumber) { const groupInfo = await getGroupInfo(userNumber, group.id) const groupMembers = await getGroupMembers(userNumber, group.id) const memberData = await getMemberData(groupMembers) - console.log('memberData: ', memberData) const ageGroupId = (memberData[0] && (await getMember(memberData[0].memberId)).age_groupId) || diff --git a/src/index.js b/src/index.js index ded0d4e..dfdfbd5 100644 --- a/src/index.js +++ b/src/index.js @@ -161,7 +161,6 @@ 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 diff --git a/src/profile.js b/src/profile.js index 09616bd..6241d1e 100644 --- a/src/profile.js +++ b/src/profile.js @@ -18,6 +18,5 @@ export async function getProfile(userNumber) { } ) - console.log('PROFILE: ', profile) return profile }