mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
smaller refactorings (mostly entitization)
This commit is contained in:
@@ -33,6 +33,10 @@ async function getBranch(branchId) {
|
||||
return await getEntity("SELECT * FROM branches WHERE branchId = ?", [branchId]);
|
||||
}
|
||||
|
||||
async function getImage(imageId) {
|
||||
return await getEntity("SELECT * FROM images WHERE imageId = ?", [imageId]);
|
||||
}
|
||||
|
||||
async function updateEntity(entity) {
|
||||
if (entity.beforeSaving) {
|
||||
entity.beforeSaving();
|
||||
@@ -54,6 +58,7 @@ module.exports = {
|
||||
getEntity,
|
||||
getNote,
|
||||
getBranch,
|
||||
getImage,
|
||||
updateEntity,
|
||||
setEntityConstructor
|
||||
};
|
||||
Reference in New Issue
Block a user