Skip to content

Commit

Permalink
Remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Linnea Myllynen committed Apr 27, 2023
1 parent 664db13 commit 429c0a8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ export async function getProfile(userNumber) {
}
)

console.log('PROFILE: ', profile)
return profile
}

0 comments on commit 429c0a8

Please sign in to comment.