getmyself
This commit is contained in:
@@ -182,11 +182,11 @@ func GenericRawUpdateOne(set DBObject, id string, a Accessor) (DBObject, int, er
|
||||
}
|
||||
|
||||
func GetMySelf(wfa Accessor) (ShallowDBObject, error) {
|
||||
id, err := GenerateNodeID()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
datas, _, _ := wfa.Search(nil, id, false)
|
||||
datas, _, _ := wfa.Search(&dbs.Filters{
|
||||
And: map[string][]dbs.Filter{
|
||||
"relation": {{Operator: dbs.EQUAL.String(), Value: 1}},
|
||||
},
|
||||
}, "", false)
|
||||
if len(datas) > 0 {
|
||||
return datas[0], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user