Skip to content
This repository was archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
fix: compatibility with node v14
Browse files Browse the repository at this point in the history
  • Loading branch information
beryxz committed Mar 3, 2022
1 parent 3641efe commit 1360c10
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function createTempFolder() {
*/
async function loginToMoodle(moodle, configs) {
logger.info('Logging into Moodle');
moodle.loginMoodleUnifiedAuth(configs.credentials.username, configs.credentials.password);
return moodle.loginMoodleUnifiedAuth(configs.credentials.username, configs.credentials.password);
}

/**
Expand Down
1 change: 1 addition & 0 deletions helpers/moodle.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Moodle {
validateStatus: status => status === 302 || status === 303
});
this.sessionToken = checkMoodleCookie(res.headers['set-cookie']);
this.checkAuth();
}

/**
Expand Down
4 changes: 2 additions & 2 deletions helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function isFilenameValidOnWindows(filename) {
*/
function replaceWindowsSpecialChars(text, replaceValue) {
// eslint-disable-next-line no-control-regex
return text.replaceAll(/[<>:"/\\|?*\x00-\x1F\r\n]/g, replaceValue);
return text.replace(/[<>:"/\\|?*\x00-\x1F\r\n]/g, replaceValue);
}

/**
Expand All @@ -59,7 +59,7 @@ function replaceWindowsSpecialChars(text, replaceValue) {
* @param {string} replaceValue A string containing the text to replace the matches with
*/
function replaceWhitespaceChars(text, replaceValue) {
return text.replaceAll(/\s/g, replaceValue);
return text.replace(/\s/g, replaceValue);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "unifi-webex-dl",
"version": "8.0.0",
"version": "8.0.1",
"description": "Download recorded lessons from unifi webex platform passing by the Moodle platform.",
"main": "app.js",
"bin": "app.js",
Expand Down

0 comments on commit 1360c10

Please sign in to comment.