Skip to content

Commit

Permalink
Update agegroup IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Linnea Myllynen committed Apr 27, 2023
1 parent c4ad6a3 commit ff66c94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module.exports.configurePassport = async (clientUrl) => {

try {
//TODO: Is there a way to not hard code these?
const restrictedAgeGroups = [4, 5, 6] //sudenpennut, seikkailijat, tarpojat
const restrictedAgeGroups = [35, 21, 13] //sudenpennut, seikkailijat, tarpojat
const memberData = await request(
`${process.env.KUKSA}/members/${profile.membernumber}`,
{
Expand All @@ -53,7 +53,7 @@ module.exports.configurePassport = async (clientUrl) => {
}
)

let ageGroup = 4 //Sudenpennut
let ageGroup = 35 //Sudenpennut
if (memberData.age_groupId !== null) {
ageGroup = memberData.age_groupId
}
Expand Down
2 changes: 1 addition & 1 deletion src/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function getProfile(userNumber) {
{
name: `${member.name.firstname} ${member.name.lastname}`,
defaultTroopId: member.default_troop_id,
ageGroupId: member.age_groupId || 4,
ageGroupId: member.age_groupId || 35,
ageGroup: member.age_group || 'Sudenpennut',
language: 'fi',
troops: member.troops,
Expand Down

0 comments on commit ff66c94

Please sign in to comment.