mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-02 19:09:55 -06:00
extra init check to provide better error response
This commit is contained in:
@@ -79,8 +79,12 @@ function reject(req, res, message) {
|
||||
}
|
||||
|
||||
function checkCredentials(req, res, next) {
|
||||
if (!sqlInit.isDbInitialized()) {
|
||||
res.status(400).send('Database is not initialized yet.');
|
||||
}
|
||||
|
||||
const header = req.headers['trilium-cred'] || '';
|
||||
const auth = new Buffer.from(header, 'base64').toString();console.log("auth", auth);
|
||||
const auth = new Buffer.from(header, 'base64').toString();
|
||||
const [username, password] = auth.split(/:/);
|
||||
|
||||
const dbUsername = optionService.getOption('username');
|
||||
|
||||
Reference in New Issue
Block a user