From d69a6f0fb1cbb01793063bd8a6915856f92d7e0d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 7 Jan 2017 20:20:30 +0900 Subject: [PATCH] Refactor: Improve readability --- src/web/service/proxy/proxy.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/web/service/proxy/proxy.ts b/src/web/service/proxy/proxy.ts index 97755a003..7a1a92fef 100644 --- a/src/web/service/proxy/proxy.ts +++ b/src/web/service/proxy/proxy.ts @@ -1,16 +1,16 @@ -import * as url from 'url'; +import * as URL from 'url'; import * as express from 'express'; import * as request from 'request'; module.exports = (req: express.Request, res: express.Response) => { - const _url = req.params.url; + const url = req.params.url; - if (!_url) { + if (!url) { return; } request({ - url: _url + (url.parse(req.url, true).search || ''), + url: url + (URL.parse(req.url, true).search || ''), encoding: null }, (err, response, content) => { if (err) {