adding inputs output struct based on argo naming for now
This commit is contained in:
parent
ed158ffdcb
commit
68bacf5da4
@ -1,7 +1,6 @@
|
|||||||
package collaborative_area
|
package collaborative_area
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"slices"
|
"slices"
|
||||||
|
|
||||||
@ -67,15 +66,10 @@ func (a *collaborativeAreaMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
|||||||
_, id := (&peer.Peer{}).IsMySelf() // get the local peer
|
_, id := (&peer.Peer{}).IsMySelf() // get the local peer
|
||||||
data.(*CollaborativeArea).Clear(id) // set the creator
|
data.(*CollaborativeArea).Clear(id) // set the creator
|
||||||
// retrieve or proper peer
|
// retrieve or proper peer
|
||||||
dd, code, err := a.peerAccessor.Search(nil, fmt.Sprintf("%v", peer.SELF.EnumIndex()), false)
|
|
||||||
fmt.Println(dd, code, err)
|
|
||||||
if code != 200 || dd == nil || len(dd) == 0 {
|
|
||||||
return nil, code, errors.New("could not retrieve the peer")
|
|
||||||
}
|
|
||||||
if data.(*CollaborativeArea).CollaborativeAreaRule != nil {
|
if data.(*CollaborativeArea).CollaborativeAreaRule != nil {
|
||||||
data.(*CollaborativeArea).CollaborativeAreaRule = &CollaborativeAreaRule{}
|
data.(*CollaborativeArea).CollaborativeAreaRule = &CollaborativeAreaRule{}
|
||||||
}
|
}
|
||||||
data.(*CollaborativeArea).CollaborativeAreaRule.Creator = dd[0].GetID()
|
data.(*CollaborativeArea).CollaborativeAreaRule.Creator = id
|
||||||
d, code, err := utils.GenericStoreOne(data.(*CollaborativeArea).Trim(), a)
|
d, code, err := utils.GenericStoreOne(data.(*CollaborativeArea).Trim(), a)
|
||||||
if code == 200 {
|
if code == 200 {
|
||||||
a.sharedWorkflow(d.(*CollaborativeArea), d.GetID()) // create all shared workflows
|
a.sharedWorkflow(d.(*CollaborativeArea), d.GetID()) // create all shared workflows
|
||||||
|
Loading…
Reference in New Issue
Block a user