generate anonymization script into a file

This commit is contained in:
zadam
2022-01-17 23:47:26 +01:00
parent 66a6c76552
commit d1b39ee8fa
18 changed files with 119 additions and 116 deletions

View File

@@ -2,8 +2,8 @@ const cls = require("../services/cls");
const sql = require("../services/sql");
const log = require("../services/log");
const becca = require("../becca/becca");
const etapiTokenService = require("../services/etapi_tokens.js");
const config = require("../services/config.js");
const etapiTokenService = require("../services/etapi_tokens");
const config = require("../services/config");
const GENERIC_CODE = "GENERIC";
const noAuthentication = config.General && config.General.noAuthentication === true;
@@ -11,7 +11,7 @@ const noAuthentication = config.General && config.General.noAuthentication === t
class EtapiError extends Error {
constructor(statusCode, code, message) {
super();
this.statusCode = statusCode;
this.code = code;
this.message = message;
@@ -72,7 +72,7 @@ function NOT_AUTHENTICATED_ROUTE(router, method, path, routeHandler) {
function getAndCheckNote(noteId) {
const note = becca.getNote(noteId);
if (note) {
return note;
}
@@ -118,7 +118,7 @@ function validateAndPatch(target, source, allowedProperties) {
}
}
}
// validation passed, let's patch
for (const propName of Object.keys(source)) {
target[propName] = source[propName];