2019-11-20 03:53:04 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const keyboardActions = require('../../services/keyboard_actions');
|
2019-11-25 01:32:18 +08:00
|
|
|
const sql = require('../../services/sql');
|
2019-11-20 03:53:04 +08:00
|
|
|
|
|
|
|
async function getKeyboardActions() {
|
|
|
|
return await keyboardActions.getKeyboardActions();
|
|
|
|
}
|
|
|
|
|
2019-11-25 01:32:18 +08:00
|
|
|
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 = {
|
2019-11-25 01:32:18 +08:00
|
|
|
getKeyboardActions,
|
|
|
|
getShortcutsForNotes
|
2019-11-20 03:53:04 +08:00
|
|
|
};
|