Http login screen on devel

This commit is contained in:
MrFry 2020-04-13 09:32:30 +02:00
parent bd0c70177d
commit dfe931bd6f
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ module.exports = function (options) {
})
} else {
res.render('login', {
redirect: 'https://' + req.hostname + req.url
devel: process.env.NS_DEVEL
})
}
}

View file

@ -98,7 +98,7 @@
<input type='hidden' id='cid' name='pw' autocomplete="off"/>
</div>
<div class='ircLinkContainer' >
<a class='ircLink' href='https://qmining.frylabs.net/irc?loginClick'>IRC</a>
<a class='ircLink' href='<%= devel? 'http' : 'https' %>://qmining.frylabs.net/irc?loginClick'>IRC</a>
</div>
<button id='sendButton' onclick="Login(this)">Login</button>
</div>
@ -117,7 +117,7 @@
}
async function Login(button) {
button.innerText = '...'
const rawResponse = await fetch('https://api.frylabs.net/login', {
const rawResponse = await fetch('<%= devel? 'http' : 'https' %>://api.frylabs.net/login', {
method: 'POST',
credentials: 'include',
headers: {