mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
refactoring of note deletion
This commit is contained in:
@@ -2,11 +2,16 @@
|
||||
|
||||
const Entity = require('./entity');
|
||||
const utils = require('../services/utils');
|
||||
const repository = require('../services/repository');
|
||||
|
||||
class Branch extends Entity {
|
||||
static get tableName() { return "branches"; }
|
||||
static get primaryKeyName() { return "branchId"; }
|
||||
|
||||
async getNote() {
|
||||
return await repository.getEntity("SELECT * FROM notes WHERE noteId = ?", [this.noteId]);
|
||||
}
|
||||
|
||||
beforeSaving() {
|
||||
this.dateModified = utils.nowDate()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user