add possibility to create week note, closes #416

This commit is contained in:
zadam
2019-02-19 22:49:57 +01:00
parent 80931a318f
commit 1d5fb0b646
2 changed files with 42 additions and 0 deletions

View File

@@ -214,6 +214,16 @@ function BackendScriptApi(currentNote, apiParams) {
*/
this.getDateNote = dateNoteService.getDateNote;
/**
* Returns note for the first date of the week of the given date.
*
* @method
* @param {string} date in YYYY-MM-DD format
* @param {object} options - "startOfTheWeek" - either "monday" (default) or "sunday"
* @returns {Promise<Note|null>}
*/
this.getWeekNote = dateNoteService.getWeekNote;
/**
* Returns month note for given date. If such note doesn't exist, it is created.
*