basic interactivity of search definition actions

This commit is contained in:
zadam
2021-01-17 23:01:01 +01:00
parent 5bb490e1ff
commit 3fa2535862
3 changed files with 143 additions and 59 deletions

View File

@@ -86,6 +86,16 @@ function setNoteAttribute(req) {
attr.save();
}
function addNoteAttribute(req) {
const noteId = req.params.noteId;
const body = req.body;
const attr = new Attribute(body);
attr.noteId = noteId;
attr.save();
}
function deleteNoteAttribute(req) {
const noteId = req.params.noteId;
const attributeId = req.params.attributeId;
@@ -220,6 +230,7 @@ module.exports = {
updateNoteAttributes,
updateNoteAttribute,
setNoteAttribute,
addNoteAttribute,
deleteNoteAttribute,
getAttributeNames,
getValuesForAttribute,