Add attachments field to one
This commit is contained in:
@@ -3,6 +3,7 @@ package view
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"local/dndex/storage"
|
||||
"local/dndex/storage/entity"
|
||||
@@ -176,7 +177,7 @@ func whoPatch(namespace string, g storage.Graph, w http.ResponseWriter, r *http.
|
||||
return err
|
||||
}
|
||||
one.Relationship = relationship
|
||||
if err := g.Update(r.Context(), namespace, entity.One{Name: id}, operator.Set{Key: "connections." + one.Name, Value: one.Peer()}); err != nil {
|
||||
if err := g.Update(r.Context(), namespace, entity.One{Name: id}, operator.Set{Key: fmt.Sprintf("%s.%s", entity.Connections, one.Name), Value: one.Peer()}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user