Compare commits
11 Commits
be767e9f27
...
4b75489631
| Author | SHA1 | Date | |
|---|---|---|---|
| 4b75489631 | |||
| cb95c78276 | |||
| 00cb100467 | |||
| 8c66461dc8 | |||
| 566f84fc0c | |||
| 07eae42ba3 | |||
| 0a1bebd862 | |||
| 59b79b3466 | |||
| 6f5526b648 | |||
| 21148f0c0e | |||
| ba6cac32a9 |
Binary file not shown.
38
check_db.py
Normal file
38
check_db.py
Normal file
@@ -0,0 +1,38 @@
|
||||
import sqlite3
|
||||
|
||||
def check_mindmap_nodes():
|
||||
try:
|
||||
conn = sqlite3.connect('database/systades.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Check if the table exists
|
||||
cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='mind_map_node';")
|
||||
table_exists = cursor.fetchone()
|
||||
|
||||
if not table_exists:
|
||||
print("Die Tabelle 'mind_map_node' existiert nicht!")
|
||||
return
|
||||
|
||||
# Check for the "Wissen" node
|
||||
cursor.execute("SELECT * FROM mind_map_node WHERE name = 'Wissen';")
|
||||
wissen_node = cursor.fetchone()
|
||||
|
||||
if wissen_node:
|
||||
print(f"'Wissen'-Knoten gefunden: {wissen_node}")
|
||||
else:
|
||||
print("'Wissen'-Knoten NICHT gefunden!")
|
||||
|
||||
# Get all nodes
|
||||
cursor.execute("SELECT id, name FROM mind_map_node LIMIT 10;")
|
||||
nodes = cursor.fetchall()
|
||||
|
||||
print(f"\nVorhandene Knoten (max. 10):")
|
||||
for node in nodes:
|
||||
print(f" - {node}")
|
||||
|
||||
conn.close()
|
||||
except Exception as e:
|
||||
print(f"Fehler: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
check_mindmap_nodes()
|
||||
1110
logs/app.log
1110
logs/app.log
File diff suppressed because it is too large
Load Diff
@@ -803,7 +803,20 @@ function createFlashContainer() {
|
||||
// Funktion zum Laden der Mindmap-Daten aus der Datenbank
|
||||
async function loadMindmapData(nodeId = null) {
|
||||
try {
|
||||
const response = await fetch(`/api/mindmap/${nodeId || 'root'}`);
|
||||
let url;
|
||||
// Wir müssen zwischen numerischen IDs und String-IDs unterscheiden
|
||||
if (nodeId === null || nodeId === undefined) {
|
||||
// Wenn keine ID angegeben ist, verwende 'root'
|
||||
url = '/api/mindmap/root';
|
||||
} else if (isNaN(parseInt(nodeId))) {
|
||||
// Für String-IDs wie 'root', 'technology', 'arts' - direkte Route
|
||||
url = `/api/mindmap/${nodeId}`;
|
||||
} else {
|
||||
// Für numerische IDs - neue Route mit /id/ Präfix
|
||||
url = `/api/mindmap/id/${nodeId}`;
|
||||
}
|
||||
|
||||
const response = await fetch(url);
|
||||
if (!response.ok) throw new Error('Fehler beim Laden der Mindmap-Daten');
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user