Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
header = {
headers: {
'Authorization': auth
}
}
}
ical.fromURL(node.config.url, header, (err, data) => {
if (err) {
callback && callback(err, null);
return;
}
callback && callback(null, data);
});
} else {
ical.parseFile(node.config.url, (err, data) => {
if (err) {
callback && callback(err, null);
return;
}
callback && callback(null, data);
});
}
}
}
header = {
headers: {
'Authorization': auth
}
};
}
ical.fromURL(node.config.url, header, function (err, data) {
if (err) {
callback && callback(err, null);
return;
}
callback && callback(null, data);
});
}
else {
ical.parseFile(node.config.url, function (err, data) {
if (err) {
callback && callback(err, null);
return;
}
callback && callback(null, data);
});
}
}
}
exports.getICal = getICal;