Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.gopath~
.DS_Store
.vscode

.idea
# Directories
vendor
bin
Expand All @@ -11,4 +11,4 @@ n2data
n3data
portainer-data
scripts/db
scripts/log
scripts/log
2 changes: 1 addition & 1 deletion gremconnect/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func MarshalResponse(msg []byte) (Response, error) {
} else {
resp.Data = result["data"]
}
resp.RequestID = j["requestId"].(string)
resp.RequestID, _ = j["requestId"].(string)

return resp, nil
}
Expand Down
7 changes: 6 additions & 1 deletion model/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ func (e *Edge) PropertyValue(key string) interface{} {

// ID will retrieve the Edge ID for you.
func (e *Edge) ID() interface{} {
return e.Value.ID
idMap, ok := e.Value.ID.(map[string]interface{})
if !ok {
return e.Value.ID
}

return idMap["@value"]
}

// Label will retrieve the Edge Label for you.
Expand Down
7 changes: 6 additions & 1 deletion model/vertex.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ func (v *Vertex) PropertyMap() PropertyMap {
// ID will retrieve the Vertex ID for you
// without having to traverse all the way through the structures.
func (v *Vertex) ID() interface{} {
return v.Value.ID
idMap, ok := v.Value.ID.(map[string]interface{})
if !ok {
return v.Value.ID
}

return idMap["@value"]
}

// Label retrieves the label of the vertex
Expand Down