ETAPI delete/patch, refactoring

This commit is contained in:
zadam
2022-01-07 19:33:59 +01:00
parent 82b2871a08
commit 9ee1c9f3da
36 changed files with 1304 additions and 11678 deletions

View File

@@ -10,7 +10,6 @@ const appInfo = require('../../services/app_info');
const eventService = require('../../services/events');
const sqlInit = require('../../services/sql_init');
const sql = require('../../services/sql');
const optionService = require('../../services/options');
const ApiToken = require('../../becca/entities/api_token');
const ws = require("../../services/ws");
@@ -92,6 +91,8 @@ function token(req) {
}
const apiToken = new ApiToken({
// for backwards compatibility with Sender which does not send the name
name: req.body.tokenName || "Trilium Sender",
token: utils.randomSecureToken()
}).save();