server-esm: Fix the remaining compilation errors

This commit is contained in:
Elian Doran 2024-07-18 21:56:20 +03:00
parent 46f76d7284
commit 1dc894e279
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View File

@ -210,7 +210,7 @@ function checkStatus(response: Response): void {
}
}
export {
export default {
describeEtapi,
getEtapi,
getEtapiResponse,

View File

@ -20,7 +20,7 @@ if (!utils.isElectron()) {
app.use(compression()); // HTTP compression
}
app.use(helmet.default({
app.use(helmet({
hidePoweredBy: false, // errors out in electron
contentSecurityPolicy: false,
crossOriginEmbedderPolicy: false

View File

@ -106,7 +106,7 @@ function register(app: express.Application) {
route(GET, '/login', [auth.checkAppInitialized, auth.checkPasswordSet], loginRoute.loginPage);
route(GET, '/set-password', [auth.checkAppInitialized, auth.checkPasswordNotSet], loginRoute.setPasswordPage);
const loginRateLimiter = rateLimit.rateLimit({
const loginRateLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 10, // limit each IP to 10 requests per windowMs
skipSuccessfulRequests: true // successful auth to rate-limited ETAPI routes isn't counted. However, successful auth to /login is still counted!

View File

@ -1,6 +1,6 @@
import treeService from "./tree.js";
import sql from "./sql.js";
import BBranch from "../becca/entities/bbranch.js.js";
import BBranch from "../becca/entities/bbranch.js";
function moveBranchToNote(branchToMove: BBranch, targetParentNoteId: string) {
if (branchToMove.parentNoteId === targetParentNoteId) {