mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
label service refactoring + rename of doInTransaction to transactional
This commit is contained in:
@@ -36,9 +36,9 @@ async function uploadImage(req) {
|
||||
return [400, "Unknown image type: " + file.mimetype];
|
||||
}
|
||||
|
||||
const parentNoteId = await dateNoteService.getDateNoteId(req.headers['x-local-date']);
|
||||
const parentNote = await dateNoteService.getDateNote(req.headers['x-local-date']);
|
||||
|
||||
const {note} = await noteService.createNewNote(parentNoteId, {
|
||||
const {note} = await noteService.createNewNote(parentNote.noteId, {
|
||||
title: "Sender image",
|
||||
content: "",
|
||||
target: 'into',
|
||||
@@ -57,9 +57,9 @@ async function uploadImage(req) {
|
||||
}
|
||||
|
||||
async function saveNote(req) {
|
||||
const parentNoteId = await dateNoteService.getDateNoteId(req.headers['x-local-date']);
|
||||
const parentNote = await dateNoteService.getDateNote(req.headers['x-local-date']);
|
||||
|
||||
await noteService.createNewNote(parentNoteId, {
|
||||
await noteService.createNewNote(parentNote.noteId, {
|
||||
title: req.body.title,
|
||||
content: req.body.content,
|
||||
target: 'into',
|
||||
|
||||
Reference in New Issue
Block a user