mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 01:06:36 +01:00
rename API .createNote() to .createNewNote() to allow future backwards compatibility
This commit is contained in:
@@ -206,7 +206,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create text note. See also createNote() for more options.
|
||||
* Create text note. See also createNewNote() for more options.
|
||||
*
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} title
|
||||
@@ -222,7 +222,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
|
||||
/**
|
||||
* Create data note - data in this context means object serializable to JSON. Created note will be of type 'code' and
|
||||
* JSON MIME type. See also createNote() for more options.
|
||||
* JSON MIME type. See also createNewNote() for more options.
|
||||
*
|
||||
* @param {string} parentNoteId
|
||||
* @param {string} title
|
||||
@@ -238,7 +238,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
});
|
||||
|
||||
/**
|
||||
* @typedef {object} CreateNoteParams
|
||||
* @typedef {object} CreateNewNoteParams
|
||||
* @property {string} parentNoteId - MANDATORY
|
||||
* @property {string} title - MANDATORY
|
||||
* @property {string|buffer} content - MANDATORY
|
||||
@@ -253,10 +253,10 @@ function BackendScriptApi(currentNote, apiParams) {
|
||||
/**
|
||||
* @method
|
||||
*
|
||||
* @param {CreateNoteParams} [params]
|
||||
* @param {CreateNewNoteParams} [params]
|
||||
* @returns {Promise<{note: Note, branch: Branch}>} object contains newly created entities note and branch
|
||||
*/
|
||||
this.createNote = noteService.createNewNote;
|
||||
this.createNewNote = noteService.createNewNote;
|
||||
|
||||
/**
|
||||
* Log given message to trilium logs.
|
||||
|
||||
Reference in New Issue
Block a user