note can be activated through 'keyboardShortcut' label

This commit is contained in:
zadam
2019-11-24 18:32:18 +01:00
parent 60c3b5cccc
commit cd139bdd76
4 changed files with 25 additions and 1 deletions

View File

@@ -1,11 +1,22 @@
"use strict";
const keyboardActions = require('../../services/keyboard_actions');
const sql = require('../../services/sql');
async function getKeyboardActions() {
return await keyboardActions.getKeyboardActions();
}
async function getShortcutsForNotes() {
return await sql.getMap(`
SELECT value, noteId
FROM attributes
WHERE isDeleted = 0
AND type = 'label'
AND name = 'keyboardShortcut'`);
}
module.exports = {
getKeyboardActions
getKeyboardActions,
getShortcutsForNotes
};