server-ts: Address review

This commit is contained in:
Elian Doran 2024-04-17 23:00:02 +03:00
parent ae29699e65
commit 0d700d6951
No known key found for this signature in database

View File

@ -70,14 +70,13 @@ import etapiNoteRoutes = require('../etapi/notes');
import etapiSpecialNoteRoutes = require('../etapi/special_notes');
import etapiSpecRoute = require('../etapi/spec');
import etapiBackupRoute = require('../etapi/backup');
import { RequestHandlerParams } from 'express-serve-static-core';
import { AppRequest, AppRequestHandler } from './route-interface';
const csrfMiddleware = csurf({
cookie: true,
path: '' // empty, so cookie is valid only for the current path
// TODO: Typescript complains that path does not exist in csurf options, but it's still in the
} as any);
cookie: {
path: "" // empty, so cookie is valid only for the current path
}
});
const MAX_ALLOWED_FILE_SIZE_MB = 250;
const GET = 'get', PST = 'post', PUT = 'put', PATCH = 'patch', DEL = 'delete';