refactor: remove deprecated url.parse() method (#7751)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
const Config = require('./Config');
|
||||
const Auth = require('./Auth');
|
||||
const RESTController = require('parse/lib/node/RESTController');
|
||||
const URL = require('url');
|
||||
const Parse = require('parse/node');
|
||||
|
||||
function getSessionToken(options) {
|
||||
@@ -38,9 +37,9 @@ function ParseServerRESTController(applicationId, router) {
|
||||
if (!config) {
|
||||
config = Config.get(applicationId);
|
||||
}
|
||||
const serverURL = URL.parse(config.serverURL);
|
||||
if (path.indexOf(serverURL.path) === 0) {
|
||||
path = path.slice(serverURL.path.length, path.length);
|
||||
const serverURL = new URL(config.serverURL);
|
||||
if (path.indexOf(serverURL.pathname) === 0) {
|
||||
path = path.slice(serverURL.pathname.length, path.length);
|
||||
}
|
||||
|
||||
if (path[0] !== '/') {
|
||||
|
||||
Reference in New Issue
Block a user