smaller refactorings continued

This commit is contained in:
azivner
2018-04-01 11:42:12 -04:00
parent fad0ec757b
commit acc82f39c4
13 changed files with 96 additions and 100 deletions

View File

@@ -37,6 +37,10 @@ async function getImage(imageId) {
return await getEntity("SELECT * FROM images WHERE imageId = ?", [imageId]);
}
async function getLabel(labelId) {
return await getEntity("SELECT * FROM labels WHERE labelId = ?", [labelId]);
}
async function updateEntity(entity) {
if (entity.beforeSaving) {
entity.beforeSaving();
@@ -59,6 +63,7 @@ module.exports = {
getNote,
getBranch,
getImage,
getLabel,
updateEntity,
setEntityConstructor
};