becca conversion WIP

This commit is contained in:
zadam
2021-05-02 21:34:57 +02:00
parent c035627f0a
commit 3091119893
17 changed files with 40 additions and 53 deletions

View File

@@ -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");
}