From dc3de5bf36786ca00d742fe818cc3a57c391378b Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 27 Feb 2026 00:05:54 +0200 Subject: [PATCH] chore(server): address requested changes --- apps/server/src/etapi/attachments.ts | 2 +- apps/server/src/etapi/etapi_utils.ts | 1 - apps/server/src/routes/api/sync.ts | 8 +++----- 3 files changed, 4 insertions(+), 7 deletions(-) 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 = {}; 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;