removed link remnants

This commit is contained in:
zadam
2019-08-27 21:24:31 +02:00
parent ca2f14a2d0
commit 242bea236f
15 changed files with 53 additions and 532 deletions

View File

@@ -1034,7 +1034,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line665">line 665</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line647">line 647</a>
</li></ul></dd>
@@ -1136,7 +1136,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line693">line 693</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line675">line 675</a>
</li></ul></dd>
@@ -1242,7 +1242,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line679">line 679</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line661">line 661</a>
</li></ul></dd>
@@ -2987,112 +2987,6 @@
<h4 class="name" id="getLinksWithDeleted"><span class="type-signature">(async) </span>getLinksWithDeleted<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;Link>>}</span></h4>
<div class="description">
Return all links from this note, including deleted ones.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line658">line 658</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;Link>></span>
</dd>
</dl>
<h4 class="name" id="getOwnedAttributes"><span class="type-signature">(async) </span>getOwnedAttributes<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</span></h4>
@@ -3247,7 +3141,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line705">line 705</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line687">line 687</a>
</li></ul></dd>
@@ -4482,112 +4376,6 @@
<h4 class="name" id="getTargetLinks"><span class="type-signature">(async) </span>getTargetLinks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;Link>>}</span></h4>
<div class="description">
Get list of links targetting this note.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line649">line 649</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.&lt;Array.&lt;Link>></span>
</dd>
</dl>
<h4 class="name" id="getTargetRelations"><span class="type-signature">(async) </span>getTargetRelations<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="Attribute.html">Attribute</a>>>}</span></h4>
@@ -4920,7 +4708,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line672">line 672</a>
<a href="entities_note.js.html">entities/note.js</a>, <a href="entities_note.js.html#line654">line 654</a>
</li></ul></dd>

View File

@@ -669,24 +669,6 @@ class Note extends Entity {
name IN ('internal-link', 'image-link', 'relation-map-link')`, [this.noteId]);
}
/**
* Get list of links targetting this note.
*
* @returns {Promise&lt;Link[]>}
*/
async getTargetLinks() {
return await repository.getEntities("SELECT * FROM links WHERE targetNoteId = ? AND isDeleted = 0", [this.noteId]);
}
/**
* Return all links from this note, including deleted ones.
*
* @returns {Promise&lt;Link[]>}
*/
async getLinksWithDeleted() {
return await repository.getEntities("SELECT * FROM links WHERE noteId = ?", [this.noteId]);
}
/**
* @returns {Promise&lt;Branch[]>}
*/

View File

@@ -38,7 +38,7 @@ const repository = require('./repository');
const axios = require('axios');
const dayjs = require('dayjs');
const cloningService = require('./cloning');
const messagingService = require('./messaging');
const ws = require('./ws.js');
const appInfo = require('./app_info');
const searchService = require('./search');
@@ -239,7 +239,7 @@ function BackendScriptApi(currentNote, apiParams) {
this.createNoteAndRefresh = async function(parentNoteId, title, content, extraOptions) {
await noteService.createNote(parentNoteId, title, content, extraOptions);
messagingService.refreshTree();
ws.refreshTree();
};
/**
@@ -335,7 +335,7 @@ function BackendScriptApi(currentNote, apiParams) {
*
* @returns {Promise&lt;void>}
*/
this.refreshTree = messagingService.refreshTree;
this.refreshTree = ws.refreshTree;
/**
* @return {{syncVersion, appVersion, buildRevision, dbVersion, dataDirectory, buildDate}|*} - object representing basic info about running Trilium version