mirror of
https://github.com/wekan/wekan.git
synced 2026-02-14 20:18:07 +01:00
Replace Npm.require with ES imports
This commit is contained in:
parent
6e48988118
commit
fa3966e1f7
1 changed files with 4 additions and 4 deletions
|
|
@ -1,8 +1,8 @@
|
|||
"use strict";
|
||||
|
||||
const https = Npm.require('https');
|
||||
const url = Npm.require('url');
|
||||
const xmlParser = Npm.require('xml2js');
|
||||
import https from 'https';
|
||||
import url from 'url';
|
||||
import xml2js from 'xml2js';
|
||||
|
||||
// Library
|
||||
class CAS {
|
||||
|
|
@ -60,7 +60,7 @@ class CAS {
|
|||
console.log(error);
|
||||
callback(undefined, false);
|
||||
} else {
|
||||
xmlParser.parseString(response, (err, result) => {
|
||||
xml2js.parseString(response, (err, result) => {
|
||||
if (err) {
|
||||
console.log('Bad response format.');
|
||||
callback({message: 'Bad response format. XML could not parse it'});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue