Skip to content

Commit

Permalink
Add console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaisa Korpela committed Oct 15, 2020
1 parent 12968a5 commit 63bda43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63bda43

Please sign in to comment.