This commit is contained in:
parent
9b58a8d237
commit
50dfb4c94a
|
@ -1,3 +1,5 @@
|
||||||
|
import logger from '../../../middleware/logger';
|
||||||
|
|
||||||
const fetch = require('node-fetch');
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
export const getiCalFile = async (user: string, file: string, showBlockers: boolean, electiveModule: string, profileModule: string): Promise<string> => {
|
export const getiCalFile = async (user: string, file: string, showBlockers: boolean, electiveModule: string, profileModule: string): Promise<string> => {
|
||||||
|
@ -98,6 +100,7 @@ export const removeElective = function (ical: iCalFile, chosenElective: string):
|
||||||
let addEvent = true;
|
let addEvent = true;
|
||||||
electiveToRemove.forEach((module) => {
|
electiveToRemove.forEach((module) => {
|
||||||
if (event.includes(module.name)) {
|
if (event.includes(module.name)) {
|
||||||
|
logger.info('Removing elective ' + module.name);
|
||||||
addEvent = false;
|
addEvent = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -123,6 +126,7 @@ export const removeProfile = function (ical: iCalFile, chosenProfile: string): i
|
||||||
profileToRemove.forEach((module) => {
|
profileToRemove.forEach((module) => {
|
||||||
module.names.forEach((name) => {
|
module.names.forEach((name) => {
|
||||||
if (event.includes(name)) {
|
if (event.includes(name)) {
|
||||||
|
logger.info('Removing profile ' + name);
|
||||||
addEvent = false;
|
addEvent = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user