chore(server): address requested changes
Some checks failed
Checks / main (push) Has been cancelled

This commit is contained in:
Elian Doran 2026-02-27 00:05:54 +02:00
parent 1041bf70e1
commit dc3de5bf36
No known key found for this signature in database
3 changed files with 4 additions and 7 deletions

View File

@ -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;

View File

@ -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) {

View File

@ -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;