mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
better error when password is not set, #2685
This commit is contained in:
parent
a009b4cb6d
commit
4dd3fd9674
@ -94,6 +94,12 @@ function reject(req, res, message) {
|
|||||||
function checkCredentials(req, res, next) {
|
function checkCredentials(req, res, next) {
|
||||||
if (!sqlInit.isDbInitialized()) {
|
if (!sqlInit.isDbInitialized()) {
|
||||||
res.status(400).send('Database is not initialized yet.');
|
res.status(400).send('Database is not initialized yet.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!passwordService.isPasswordSet()) {
|
||||||
|
res.status(400).send('Password has not been set yet. Please set a password and repeat the action');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const header = req.headers['trilium-cred'] || '';
|
const header = req.headers['trilium-cred'] || '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user