mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
becca conversion WIP
This commit is contained in:
@@ -63,6 +63,7 @@ function checkAppNotInitialized(req, res, next) {
|
||||
function checkToken(req, res, next) {
|
||||
const token = req.headers.authorization;
|
||||
|
||||
// TODO: put all tokens into becca memory to avoid these requests
|
||||
if (sql.getValue("SELECT COUNT(*) FROM api_tokens WHERE isDeleted = 0 AND token = ?", [token]) === 0) {
|
||||
reject(req, res, "Token not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user