converted note revision protection to repository/entities

This commit is contained in:
azivner
2018-03-31 10:51:37 -04:00
parent 088fb00ca9
commit e8a5d0ae16
14 changed files with 99 additions and 98 deletions

View File

@@ -1,13 +1,14 @@
"use strict";
const Entity = require('./entity');
const repository = require('../services/repository');
class Label extends Entity {
static get tableName() { return "labels"; }
static get primaryKeyName() { return "labelId"; }
async getNote() {
return this.repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
}
}