fixing errors
Deploy / deploy (push) Successful in 38s

This commit is contained in:
2026-05-07 21:33:21 +02:00
parent bfa69f2a60
commit 8321e3b889
3 changed files with 10 additions and 5 deletions
+2
View File
@@ -364,6 +364,8 @@ function handleComments($method, $id, $db) {
}
function handleNodes($method, $id, $db) {
// Ensure node_notes table exists
try { $db->exec("CREATE TABLE IF NOT EXISTS node_notes (node_id INT, notes TEXT DEFAULT '')"); } catch (Exception $e) {}
switch ($method) {
case 'GET':
echo json_encode($db->query("SELECT n.*, nn.notes FROM network_nodes n LEFT JOIN node_notes nn ON n.id = nn.node_id ORDER BY n.group_name, n.label")->fetchAll(PDO::FETCH_ASSOC));