From 00cb100467049e03bbc9e41f6834b571163e12f0 Mon Sep 17 00:00:00 2001 From: Till Tomczak Date: Sun, 11 May 2025 00:25:50 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=C3=84nderungen=20commited?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __pycache__/app.cpython-313.pyc | Bin 116734 -> 117884 bytes app.py | 52 ++++++++- logs/app.log | 192 ++++++++++++++++++++++++++++++++ static/js/update_mindmap.js | 15 ++- 4 files changed, 257 insertions(+), 2 deletions(-) diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc index 1f5382a11667d2a8ec86a7df1e6ae5f54576c001..05c01a18f2ff913ad3c5598373a656825ddd8383 100644 GIT binary patch delta 1323 zcmZuxYfKzf6uxKfK8D#{*z#C*S8#_yYBzx$A0U;84Frnd18{hhg-RB7x19(J-dWOQ zO{Dx0O>7$7A8Y(!#F#X(HdcvlY-_?JrcEs}wFFSB{;<9hAIolk5H!SlcUi1WCo|vq z?wRkLd(ORgX8V-!pEr!TDT_rw^lJUeb&NaxTCN?|KfG_%2FtVCw*B1e=HlX|8ejs1 z_u2+qFJpu-4q^<$f4gfUWr847>%f7TrrXA5*&^ruHd97wGsK65DIb8vX@-3zv`e67xY`AXU>;Jt>=WvLb>RE$VSSxYEI=` zNG=X>4P3>J4MGs@?1+7$g{Bo+l%cTbR{~>)q0tvOFiAU7HNl(H^zgVE0!{KVh_d;K$GzcBcf!EX${WpIVTB?iCK!x({@*jx$N zC-2%wrjR<3cv;FXSkUv7J?%D%jg4>T3M& zIK0X~`S6@=jz8hhpmiPcHn@5)rZD2H4B8-}qvOPjKpUBMOgS`Di}s9H>+EOxfwbNV z`*!t5V%O&2U`gZUp39FjMR!_Ja+{(jUO5k?hRWoCt`&nJ;Wg}LF1rqUH#iA8faNRC z(9J}j9P7FS!KPZY{6Gb$|)}R*SWPP5R Pk5l=2%2Q53bsPT$ig|C( delta 421 zcmew}gZ*DWJKtwsUM>b8n0rw^yuo@B3bdn5tB# zAK1buv3>nQ##TngYuim1GsbZ+R&AfMnz5RZv1+=&T1I;y6|k1k6(~AwE#oOhwlho& z3`J+Qr>$pXVrDP;2Xvq2-R*tb7&(|3Pj8>Tld+eH?HX9gbp1VyvRtan3=E7wMa7%9 zhwWkP;qWrvk+vhELGl8l+YLtkk4(0V?4Ow#m;^wCJL3lyApb)hBLfp_yJVx}1#XuU z6(_Plsw2Uw1sK)fs-vds9c8qau|J`9LIR{B2&_T|Nk#DX&ZCU7Y}}t?SUi~-*?xSe z^_hO@G-H~J0>gPjl|p-lcdWw2%*-F{*@|SDKe6%_NicsBVkuH!_$0v!5|L#Fu@%^g Y8JIt*@fTS$f3ju;vOhC(6$`Ng02Bm;IRF3v diff --git a/app.py b/app.py index 5605e90..dc16d02 100644 --- a/app.py +++ b/app.py @@ -2817,4 +2817,54 @@ def get_fallback_mindmap_data(node_id): "edges": edges } -# Diese Routen wurden an den Anfang der Datei verschoben und werden nicht mehr benötigt \ No newline at end of file +# Diese Routen wurden an den Anfang der Datei verschoben und werden nicht mehr benötigt + +@app.route('/api/mindmap/science') +def get_science_mindmap(): + """ + Gibt die Wissenschafts-Mindmap zurück für Frontend-Kompatibilität. + """ + app.logger.info("Wissenschafts-Mindmap-Daten werden angefordert.") + + try: + nodes = [ + { + "id": "physics", + "name": "Physik", + "description": "Lehre von der Materie und ihren Wechselwirkungen", + "category": "Wissenschaft", + "has_children": True, + "color_code": "#f4b400" + }, + { + "id": "biology", + "name": "Biologie", + "description": "Lehre von den Lebewesen und ihren Lebensprozessen", + "category": "Wissenschaft", + "has_children": True, + "color_code": "#f4b400" + }, + { + "id": "chemistry", + "name": "Chemie", + "description": "Wissenschaft von den Stoffen und ihren Reaktionen", + "category": "Wissenschaft", + "has_children": True, + "color_code": "#f4b400" + } + ] + + edges = [ + {"source_id": "science", "target_id": "physics", "strength": 0.8}, + {"source_id": "science", "target_id": "biology", "strength": 0.8}, + {"source_id": "science", "target_id": "chemistry", "strength": 0.8} + ] + + return jsonify({ + "nodes": nodes, + "edges": edges + }) + + except Exception as e: + app.logger.error(f"Fehler beim Abrufen der Wissenschafts-Mindmap-Daten: {str(e)}") + return jsonify({"error": "Fehler beim Abrufen der Mindmap-Daten"}), 500 \ No newline at end of file diff --git a/logs/app.log b/logs/app.log index b7ee9b9..f09d30e 100644 --- a/logs/app.log +++ b/logs/app.log @@ -1462,3 +1462,195 @@ werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on 2025-05-11 00:22:24,158 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] 2025-05-11 00:22:26,170 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] 2025-05-11 00:22:26,170 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:23:28,446 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:23:30,235 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:23:30,235 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:04,692 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:04,692 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:05,404 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:07,202 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:07,202 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:07,640 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:09,535 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:09,535 INFO: Anwendung gestartet [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:11,258 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:12,041 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:12,041 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:12,282 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:12,282 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/root, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:13,080 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:13,080 INFO: Anwendung gestartet [in c:\Users\TTOMCZA.EMEA\Dev\website\app.py:76] +2025-05-11 00:24:14,077 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/science, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:14,077 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/science, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:14,752 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/science, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] +2025-05-11 00:24:14,752 ERROR: Fehler 404: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. +Endpoint: /api/mindmap/science, Method: GET, IP: 127.0.0.1 +User: 1 (admin) +Traceback (most recent call last): + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1823, in full_dispatch_request + rv = self.dispatch_request() + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1788, in dispatch_request + self.raise_routing_exception(req) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\app.py", line 1770, in raise_routing_exception + raise request.routing_exception # type: ignore + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\flask\ctx.py", line 351, in match_request + result = self.url_adapter.match(return_rule=True) # type: ignore + File "C:\Users\TTOMCZA.EMEA\AppData\Roaming\Python\Python313\site-packages\werkzeug\routing\map.py", line 624, in match + raise NotFound() from None +werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. + [in C:\Users\TTOMCZA.EMEA\Dev\website\app.py:92] diff --git a/static/js/update_mindmap.js b/static/js/update_mindmap.js index 4145129..ab3f6f2 100644 --- a/static/js/update_mindmap.js +++ b/static/js/update_mindmap.js @@ -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) {