Skip to content

Commit

Permalink
Fix excluded information not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
abhidas03 committed Mar 27, 2024
1 parent 8b8b91f commit 8dd0e4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/pagebody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function filterData({ user_settings, searchParams }: { user_settings: any,

console.time("foreach")
await Promise.all(raw.map(async (student) => {
if (student['USER_ID'] in user_settings[0]['EXCLUDED_USERS']) {
if (user_settings[0]['EXCLUDED_USERS'].includes(student['USER_ID'])) {
return;
}

Expand All @@ -60,7 +60,7 @@ async function filterData({ user_settings, searchParams }: { user_settings: any,

let path = '/placeholder.jpg';

if (!(student['USER_ID'] in user_settings[0]['PHOTO_HIDDEN'])) {
if (!(user_settings[0]['PHOTO_HIDDEN'].includes(student['USER_ID']))) {
const modPath = `/photos/mod/${student['USER_ID']}_m.jpg`;
const genModPath = `${__dirname}/../../..${modPath}`;

Expand Down Expand Up @@ -97,7 +97,7 @@ async function filterData({ user_settings, searchParams }: { user_settings: any,
pronouns: ""
}

if (student['USER_ID'] in user_settings[0]['ROOM_HIDDEN']) {
if (user_settings[0]['ROOM_HIDDEN'].includes(student['USER_ID'])) {
newStudent.room = '';
newStudent.dorm = '';
}
Expand Down

0 comments on commit 8dd0e4b

Please sign in to comment.