mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Updated Custom request handler (markdown)
parent
f1d6802b6d
commit
9e57181a12
@ -15,8 +15,9 @@ if (req.method == 'POST' && secret === 'secret-password') {
|
|||||||
// alternetively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
|
// alternetively you can just use constant noteId for simplicity (get that from "Note Info" dialog of the desired parent note)
|
||||||
const targetParentNoteId = await api.currentNote.getRelationValue('targetNote');
|
const targetParentNoteId = await api.currentNote.getRelationValue('targetNote');
|
||||||
|
|
||||||
await api.createTextNote(targetParentNoteId, title, content);
|
const {note} = await api.createTextNote(targetParentNoteId, title, content);
|
||||||
res.send(201);
|
|
||||||
|
res.status(201).json(note);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
res.send(400);
|
res.send(400);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user