First steps to creating a new node

This commit is contained in:
Magnus Åhall 2025-06-28 09:13:26 +02:00
parent 1ce8e29e37
commit 989542be91
6 changed files with 101 additions and 44 deletions

10
main.go
View file

@ -334,9 +334,15 @@ func actionSyncToServer(w http.ResponseWriter, r *http.Request) { // {{{
return
}
db.Exec(`CALL add_nodes($1, $2, $3::jsonb)`, user.UserID, user.ClientUUID, request.NodeData)
_, err = db.Exec(`CALL add_nodes($1, $2, $3::jsonb)`, user.UserID, user.ClientUUID, request.NodeData)
if err != nil {
Log.Error("sync", "error", err)
httpError(w, err)
return
}
responseData(w, map[string]interface{}{
responseData(w, map[string]any{
"OK": true,
})
} // }}}