From db24ca039a29e126c130db89d80b697c228c05b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20Moskvil=20Lyng=C3=A5s?= Date: Thu, 10 Feb 2022 21:26:18 +0100 Subject: [PATCH] Exclude IOP classes --- Classes/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/index.js b/Classes/index.js index 6e1030c..dcc9139 100644 --- a/Classes/index.js +++ b/Classes/index.js @@ -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])