mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
feat: show error if json is invalid
This commit is contained in:
@@ -54,7 +54,9 @@ function checkSetupFlag(next) {
|
||||
if (nconf.get('setup')) {
|
||||
setupVal = JSON.parse(nconf.get('setup'));
|
||||
}
|
||||
} catch (err) {}
|
||||
} catch (err) {
|
||||
winston.error('Invalid json in nconf.get(\'setup\'), ignoring setup values');
|
||||
}
|
||||
|
||||
if (setupVal && typeof setupVal === 'object') {
|
||||
if (setupVal['admin:username'] && setupVal['admin:password'] && setupVal['admin:password:confirm'] && setupVal['admin:email']) {
|
||||
|
||||
Reference in New Issue
Block a user