mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 15:46:05 +02:00
fix(calendar): wrong parent when creating day note from unhoisted workspace calendar root
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
import dateNoteService from "../../services/date_notes.js";
|
||||
import sql from "../../services/sql.js";
|
||||
import cls from "../../services/cls.js";
|
||||
import specialNotesService, { type LauncherType } from "../../services/special_notes.js";
|
||||
import becca from "../../becca/becca.js";
|
||||
import type { Request } from "express";
|
||||
|
||||
import becca from "../../becca/becca.js";
|
||||
import cls from "../../services/cls.js";
|
||||
import dateNoteService from "../../services/date_notes.js";
|
||||
import specialNotesService, { type LauncherType } from "../../services/special_notes.js";
|
||||
import sql from "../../services/sql.js";
|
||||
|
||||
function getInboxNote(req: Request) {
|
||||
return specialNotesService.getInboxNote(req.params.date);
|
||||
}
|
||||
|
||||
function getDayNote(req: Request) {
|
||||
return dateNoteService.getDayNote(req.params.date);
|
||||
const calendarRootId = req.query.calendarRootId;
|
||||
const calendarRoot = calendarRootId ? becca.getNoteOrThrow(String(calendarRootId)) : null;
|
||||
return dateNoteService.getDayNote(req.params.date, calendarRoot);
|
||||
}
|
||||
|
||||
function getWeekFirstDayNote(req: Request) {
|
||||
@@ -59,9 +62,8 @@ function getDayNotesForMonth(req: Request) {
|
||||
}
|
||||
|
||||
return result;
|
||||
} else {
|
||||
return sql.getMap(query);
|
||||
}
|
||||
return sql.getMap(query);
|
||||
}
|
||||
|
||||
async function saveSqlConsole(req: Request) {
|
||||
|
||||
Reference in New Issue
Block a user