trilium/src/routes/api/keys.js

22 lines
519 B
JavaScript
Raw Normal View History

2019-11-20 03:53:04 +08:00
"use strict";
const keyboardActions = require('../../services/keyboard_actions');
const sql = require('../../services/sql');
2019-11-20 03:53:04 +08:00
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'`);
}
2019-11-20 03:53:04 +08:00
module.exports = {
getKeyboardActions,
getShortcutsForNotes
2019-11-20 03:53:04 +08:00
};