mirror of
https://github.com/zadam/trilium.git
synced 2026-03-01 01:53:38 +01:00
This commit is contained in:
parent
1041bf70e1
commit
dc3de5bf36
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user