Skip to content

Build your personal knowledge base with Trilium Notes

chore(server): address requested changes

Elian Dorandc3de5bf3678
diff --git a/apps/server/src/etapi/attachments.ts b/apps/server/src/etapi/attachments.ts
index 453da10edf..3bb200dc97 100644
--- a/apps/server/src/etapi/attachments.ts
+++ b/apps/server/src/etapi/attachments.ts
@@ -24,7 +24,7 @@ function register(router: Router) {
content: [v.isString]
};
- eu.route<{ attachmentId: string }>(router, "post", "/etapi/attachments", (req, res, next) => {
+ eu.route(router, "post", "/etapi/attachments", (req, res, next) => {
const _params: Partial<AttachmentRow> = {};
eu.validateAndPatch(_params, req.body, ALLOWED_PROPERTIES_FOR_CREATE_ATTACHMENT);
const params = _params as AttachmentRow;
diff --git a/apps/server/src/etapi/etapi_utils.ts b/apps/server/src/etapi/etapi_utils.ts
index 7ad4a3c5af..34ed0d9cb7 100644
--- a/apps/server/src/etapi/etapi_utils.ts
+++ b/apps/server/src/etapi/etapi_utils.ts
@@ -99,7 +99,6 @@ function getAndCheckAttachment(attachmentId: string) {
return attachment;
}
throw new EtapiError(404, "ATTACHMENT_NOT_FOUND", `Attachment '${attachmentId}' not found.`);
-
}
function getAndCheckBranch(branchId: string) {
diff --git a/apps/server/src/routes/api/sync.ts b/apps/server/src/routes/api/sync.ts
index 84e0683138..8597b07c6d 100644
--- a/apps/server/src/routes/api/sync.ts
+++ b/apps/server/src/routes/api/sync.ts
@@ -1,6 +1,4 @@
-
-
-import { type EntityChange,SyncTestResponse } from "@triliumnext/commons";
+import { type EntityChange, SyncTestResponse } from "@triliumnext/commons";
import type { Request } from "express";
import { t } from "i18next";
@@ -288,10 +286,10 @@ function update(req: Request) {
if (pageIndex !== pageCount - 1) {
return;
- }
+ }
body = JSON.parse(partialRequests[requestId].payload);
delete partialRequests[requestId];
-
+
}
const { entities, instanceId } = body;