refactoring of note deletion

This commit is contained in:
azivner
2018-03-31 23:08:22 -04:00
parent 4f200c73dc
commit 12439d8761
9 changed files with 46 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
"use strict";
const utils = require('../services/utils');
const repository = require('../services/repository');
class Entity {
constructor(row) {
@@ -10,6 +11,10 @@ class Entity {
this[key] = row[key];
}
}
async save() {
await repository.updateEntity(this);
}
}
module.exports = Entity;