simplify call to peer
This commit is contained in:
parent
143fe1446e
commit
767c14044f
@ -176,7 +176,6 @@ func (wfa *sharedWorkspaceMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
||||
id, _ := static.GetMyLocalJsonPeer()
|
||||
data.(*SharedWorkspace).CreatorID = id
|
||||
data.(*SharedWorkspace).Peers = append(data.(*SharedWorkspace).Peers, id)
|
||||
d, code, err := wfa.GenericStoreOne(data.(*SharedWorkspace), wfa)
|
||||
if data.(*SharedWorkspace).Workspaces == nil {
|
||||
data.(*SharedWorkspace).Workspaces = []string{}
|
||||
}
|
||||
@ -186,6 +185,9 @@ func (wfa *sharedWorkspaceMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
||||
if data.(*SharedWorkspace).Rules == nil {
|
||||
data.(*SharedWorkspace).Rules = []string{}
|
||||
}
|
||||
|
||||
d, code, err := wfa.GenericStoreOne(data.(*SharedWorkspace), wfa)
|
||||
|
||||
if code == 200 {
|
||||
wfa.sharedWorkflow(d.(*SharedWorkspace), d.GetID())
|
||||
wfa.sharedWorkspace(d.(*SharedWorkspace), d.GetID())
|
||||
|
Loading…
Reference in New Issue
Block a user