From 63bda43f246f7fdcb9aba32571c06de9e573b29f Mon Sep 17 00:00:00 2001 From: Kaisa Korpela Date: Thu, 15 Oct 2020 11:57:28 +0300 Subject: [PATCH] Add console logs --- src/groups.js | 3 +++ src/index.js | 1 + 2 files changed, 4 insertions(+) diff --git a/src/groups.js b/src/groups.js index bf630f3..7752aa5 100644 --- a/src/groups.js +++ b/src/groups.js @@ -31,6 +31,7 @@ async function getMemberData(groupMembers) { } function filterGroups(userNumber, groupsData) { + console.log('GROUPSDATA', groupsData) return groupsData.filter(groupData => { const groupMember = groupData.members.find(member => { return member.memberId == userNumber @@ -41,7 +42,9 @@ function filterGroups(userNumber, groupsData) { async function getAllGroups(userNumber) { const member = await getMember(userNumber) + console.log('MEMBER', member) const memberGroups = await getGroupsFromKuksa(userNumber) + console.log('MEMBERGROUPS', memberGroups) const groupAndMemberData = Promise.all( memberGroups.groups.map(async group => { const groupInfo = await getGroupInfo(userNumber, group.id) diff --git a/src/index.js b/src/index.js index ba8304e..2320274 100644 --- a/src/index.js +++ b/src/index.js @@ -189,6 +189,7 @@ const main = async () => { }) app.get('/groups', isLoggedIn, async (req, res) => { + console.log('getGroupsReqUser', req.user) try { const groups = await getGroups(req.user.membernumber) res.json(groups).status(200)