aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/v1/users.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-11 21:19:34 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-13 14:23:11 +0200
commitbc503c2a62dcf9aed6b8d90b68f0f27a7755ac01 (patch)
treea1fe1ad88afd29ee4d7cb05c480649d5a9c6f9a0 /server/controllers/api/v1/users.js
parent881a5e68b64e4acd43408852bbdc914643d8fac6 (diff)
downloadPeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.gz
PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.zst
PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.zip
Update to standard 7. Goodbye snake_case, I used to love you
Diffstat (limited to 'server/controllers/api/v1/users.js')
-rw-r--r--server/controllers/api/v1/users.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/v1/users.js b/server/controllers/api/v1/users.js
index 1125b9faa..0584d5cdf 100644
--- a/server/controllers/api/v1/users.js
+++ b/server/controllers/api/v1/users.js
@@ -20,14 +20,14 @@ module.exports = router
20// --------------------------------------------------------------------------- 20// ---------------------------------------------------------------------------
21 21
22function getAngularClient (req, res, next) { 22function getAngularClient (req, res, next) {
23 const server_host = config.get('webserver.host') 23 const serverHost = config.get('webserver.host')
24 const server_port = config.get('webserver.port') 24 const serverPort = config.get('webserver.port')
25 let header_host_should_be = server_host 25 let headerHostShouldBe = serverHost
26 if (server_port !== 80 && server_port !== 443) { 26 if (serverPort !== 80 && serverPort !== 443) {
27 header_host_should_be += ':' + server_port 27 headerHostShouldBe += ':' + serverPort
28 } 28 }
29 29
30 if (req.get('host') !== header_host_should_be) return res.type('json').status(403).end() 30 if (req.get('host') !== headerHostShouldBe) return res.type('json').status(403).end()
31 31
32 Users.getFirstClient(function (err, client) { 32 Users.getFirstClient(function (err, client) {
33 if (err) return next(err) 33 if (err) return next(err)