using whole note box to drag the box instead of special handle

This commit is contained in:
azivner
2018-10-30 11:28:48 +01:00
parent 2a14ea8d0c
commit 93d152eae5
3 changed files with 25 additions and 62 deletions

View File

@@ -134,20 +134,12 @@ async function deleteRelation(req) {
let attribute = await repository.getEntity(`SELECT * FROM attributes WHERE isDeleted = 0 AND noteId = ? AND type = 'relation' AND name = ? AND value = ?`, [sourceNoteId, name, targetNoteId]);
if (!attribute) {
attribute = new Attribute();
attribute.noteId = sourceNoteId;
attribute.name = name;
attribute.type = 'relation';
attribute.value = targetNoteId;
if (attribute) {
attribute.isDeleted = true;
await attribute.save();
}
return attribute;
}
module.exports = {
updateNoteAttributes,
updateNoteAttribute,