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)
|
||||
const targetParentNoteId = await api.currentNote.getRelationValue('targetNote');
|
||||
|
||||
await api.createTextNote(targetParentNoteId, title, content);
|
||||
res.send(201);
|
||||
const {note} = await api.createTextNote(targetParentNoteId, title, content);
|
||||
|
||||
res.status(201).json(note);
|
||||
}
|
||||
else {
|
||||
res.send(400);
|
||||
|
Loading…
x
Reference in New Issue
Block a user