mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
4672d98e8a
commit
13406e76de
@ -90,7 +90,7 @@ function getToken(req,res,next) {
|
|||||||
return server.token()(req,res,next);
|
return server.token()(req,res,next);
|
||||||
}
|
}
|
||||||
|
|
||||||
function login(req,res) {
|
async function login(req,res) {
|
||||||
var response = {};
|
var response = {};
|
||||||
if (settings.adminAuth) {
|
if (settings.adminAuth) {
|
||||||
var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module);
|
var mergedAdminAuth = Object.assign({}, settings.adminAuth, settings.adminAuth.module);
|
||||||
@ -116,8 +116,9 @@ function login(req,res) {
|
|||||||
response.prompts[0].image = theme.serveFile('/login/',mergedAdminAuth.strategy.image);
|
response.prompts[0].image = theme.serveFile('/login/',mergedAdminAuth.strategy.image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (theme.context().login && theme.context().login.image) {
|
let themeContext = await theme.context();
|
||||||
response.image = theme.context().login.image;
|
if (themeContext.login && themeContext.login.image) {
|
||||||
|
response.image = themeContext.login.image;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
res.json(response);
|
res.json(response);
|
||||||
|
Loading…
Reference in New Issue
Block a user