mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
script related changes
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
const Entity = require('./entity');
|
||||
|
||||
class Note extends Entity {
|
||||
constructor(sql, row) {
|
||||
super(sql, row);
|
||||
|
||||
if (this.type === "code" && this.mime === "application/json") {
|
||||
this.jsonContent = JSON.parse(this.content);
|
||||
}
|
||||
}
|
||||
|
||||
async getAttributes() {
|
||||
return this.sql.getEntities("SELECT * FROM attributes WHERE noteId = ?", [this.noteId]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user