use Url instead for url for "url" module

to avoid possible conflicts with use of url as a variable
This commit is contained in:
Brian Gough 2016-05-26 16:24:18 +01:00
parent d83cd547fb
commit b55c469b91

View file

@ -5,7 +5,7 @@ request = require('request')
Project = require("../../models/Project").Project Project = require("../../models/Project").Project
ProjectEntityHandler = require("../Project/ProjectEntityHandler") ProjectEntityHandler = require("../Project/ProjectEntityHandler")
logger = require "logger-sharelatex" logger = require "logger-sharelatex"
url = require("url") Url = require("url")
ClsiCookieManager = require("./ClsiCookieManager") ClsiCookieManager = require("./ClsiCookieManager")
@ -75,7 +75,7 @@ module.exports = ClsiManager =
_parseOutputFiles: (project_id, rawOutputFiles = []) -> _parseOutputFiles: (project_id, rawOutputFiles = []) ->
outputFiles = [] outputFiles = []
for file in rawOutputFiles for file in rawOutputFiles
path = url.parse(file.url).path path = Url.parse(file.url).path
path = path.replace("/project/#{project_id}/output/", "") path = path.replace("/project/#{project_id}/output/", "")
outputFiles.push outputFiles.push
path: path path: path