mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-esm: Fix the remaining compilation errors
This commit is contained in:
parent
46f76d7284
commit
1dc894e279
@ -210,7 +210,7 @@ function checkStatus(response: Response): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export default {
|
||||||
describeEtapi,
|
describeEtapi,
|
||||||
getEtapi,
|
getEtapi,
|
||||||
getEtapiResponse,
|
getEtapiResponse,
|
||||||
|
@ -20,7 +20,7 @@ if (!utils.isElectron()) {
|
|||||||
app.use(compression()); // HTTP compression
|
app.use(compression()); // HTTP compression
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(helmet.default({
|
app.use(helmet({
|
||||||
hidePoweredBy: false, // errors out in electron
|
hidePoweredBy: false, // errors out in electron
|
||||||
contentSecurityPolicy: false,
|
contentSecurityPolicy: false,
|
||||||
crossOriginEmbedderPolicy: false
|
crossOriginEmbedderPolicy: false
|
||||||
|
@ -106,7 +106,7 @@ function register(app: express.Application) {
|
|||||||
route(GET, '/login', [auth.checkAppInitialized, auth.checkPasswordSet], loginRoute.loginPage);
|
route(GET, '/login', [auth.checkAppInitialized, auth.checkPasswordSet], loginRoute.loginPage);
|
||||||
route(GET, '/set-password', [auth.checkAppInitialized, auth.checkPasswordNotSet], loginRoute.setPasswordPage);
|
route(GET, '/set-password', [auth.checkAppInitialized, auth.checkPasswordNotSet], loginRoute.setPasswordPage);
|
||||||
|
|
||||||
const loginRateLimiter = rateLimit.rateLimit({
|
const loginRateLimiter = rateLimit({
|
||||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||||
max: 10, // limit each IP to 10 requests per windowMs
|
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!
|
skipSuccessfulRequests: true // successful auth to rate-limited ETAPI routes isn't counted. However, successful auth to /login is still counted!
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import treeService from "./tree.js";
|
import treeService from "./tree.js";
|
||||||
import sql from "./sql.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) {
|
function moveBranchToNote(branchToMove: BBranch, targetParentNoteId: string) {
|
||||||
if (branchToMove.parentNoteId === targetParentNoteId) {
|
if (branchToMove.parentNoteId === targetParentNoteId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user