Skip to content

Commit

Permalink
fix(url): invalid parse
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Jan 30, 2019
1 parent 10a08de commit 1738287
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/controllers/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,13 @@ ticketsController.getByStatus = function (req, res, next) {
status: []
}

var pathname = url.URL(req.url).pathname
var fullUrl = url.format({
protocol: req.protocol,
host: req.get('host'),
pathname: req.originalUrl
})

var pathname = new url.URL(fullUrl).pathname
var arr = pathname.split('/')
var tType = 'new'
var s = 0
Expand Down

0 comments on commit 1738287

Please sign in to comment.