mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
#98, sync to server now works as well + a lot of related changes
This commit is contained in:
@@ -38,6 +38,15 @@ async function checkApiAuth(req, res, next) {
|
||||
}
|
||||
}
|
||||
|
||||
async function checkAppInitialized(req, res, next) {
|
||||
if (!await sqlInit.isDbInitialized()) {
|
||||
res.redirect("setup");
|
||||
}
|
||||
else {
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
async function checkAppNotInitialized(req, res, next) {
|
||||
if (await sqlInit.isDbInitialized()) {
|
||||
res.status(400).send("App already initialized.");
|
||||
@@ -77,6 +86,7 @@ async function checkBasicAuth(req, res, next) {
|
||||
module.exports = {
|
||||
checkAuth,
|
||||
checkApiAuth,
|
||||
checkAppInitialized,
|
||||
checkAppNotInitialized,
|
||||
checkApiAuthOrElectron,
|
||||
checkSenderToken,
|
||||
|
||||
Reference in New Issue
Block a user