basic saving of attributes in the widget

This commit is contained in:
zadam
2020-06-05 17:25:14 +02:00
parent ad48b59893
commit f245d51746
8 changed files with 130 additions and 20 deletions

View File

@@ -541,13 +541,14 @@ class Note extends Entity {
/**
* @return {Promise<Attribute>}
*/
async addAttribute(type, name, value = "", isInheritable = false) {
async addAttribute(type, name, value = "", isInheritable = false, position = 1000) {
const attr = new Attribute({
noteId: this.noteId,
type: type,
name: name,
value: value,
isInheritable: isInheritable
isInheritable: isInheritable,
position: position
});
await attr.save();