Skip to content

Commit

Permalink
Exclude IOP classes
Browse files Browse the repository at this point in the history
  • Loading branch information
runely committed Feb 10, 2022
1 parent 50bb9f8 commit db24ca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ const handleClasses = async (context, req) => {

try {
logger('info', ['handle-classes', 'user', user, 'get-classes'])
const classes = await getMyClasses(user)
let classes = await getMyClasses(user)
if (classes === false) {
logger('info', ['handle-classes', 'user', user, 'get-classes', 'teacher not found'])
return getResponse([])
}
classes = classes.filter(c => !c.name.includes('/IOP') && !c.name.includes('-IOP')) // exclude IOP classes

logger('info', ['handle-classes', 'user', user, 'get-classes', 'classes', classes.length])

Expand Down

0 comments on commit db24ca0

Please sign in to comment.