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);
|
||||
}
|
||||
|
||||
function login(req,res) {
|
||||
async function login(req,res) {
|
||||
var response = {};
|
||||
if (settings.adminAuth) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (theme.context().login && theme.context().login.image) {
|
||||
response.image = theme.context().login.image;
|
||||
let themeContext = await theme.context();
|
||||
if (themeContext.login && themeContext.login.image) {
|
||||
response.image = themeContext.login.image;
|
||||
}
|
||||
}
|
||||
res.json(response);
|
||||
|
Loading…
Reference in New Issue
Block a user