From 2469c5458117d19770aeca29e6cf0a2118df2631 Mon Sep 17 00:00:00 2001 From: eorg_oz Date: Wed, 22 Mar 2017 16:46:00 +0100 Subject: [PATCH] login fix --- public/css/style.css | 4 ++++ routes/routes.js | 2 +- views/login.hbs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 9d09601..b8eb537 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -36,3 +36,7 @@ h1{ font-size: 100%; color: black; } + +input { + color: initial; +} diff --git a/routes/routes.js b/routes/routes.js index c4724eb..717183f 100644 --- a/routes/routes.js +++ b/routes/routes.js @@ -13,7 +13,7 @@ router.get('/login', function(req, res, next) { if(req.session.passwd=='insecure'){ res.redirect('/admin'); }else{ - res.render('login', { mainHeader: 'Please Login' }); + res.render('login', { mainHeader: 'Please Login', domain: 'raspberrypi.home', port: '3030'}); } }); diff --git a/views/login.hbs b/views/login.hbs index 1ff97c3..097e3ad 100644 --- a/views/login.hbs +++ b/views/login.hbs @@ -19,7 +19,7 @@ function sendPass() { email = $("#email").val(); pass = $("#password").val(); - $.post("http://localhost:3000/login", { + $.post("http://{{domain}}:{{port}}/login", { passwd: pass }, function(data) { console.log(data);