First steps to creating a new node
This commit is contained in:
parent
1ce8e29e37
commit
989542be91
6 changed files with 101 additions and 44 deletions
10
main.go
10
main.go
|
|
@ -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,
|
||||
})
|
||||
} // }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue