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()
|
id, _ := static.GetMyLocalJsonPeer()
|
||||||
data.(*SharedWorkspace).CreatorID = id
|
data.(*SharedWorkspace).CreatorID = id
|
||||||
data.(*SharedWorkspace).Peers = append(data.(*SharedWorkspace).Peers, id)
|
data.(*SharedWorkspace).Peers = append(data.(*SharedWorkspace).Peers, id)
|
||||||
d, code, err := wfa.GenericStoreOne(data.(*SharedWorkspace), wfa)
|
|
||||||
if data.(*SharedWorkspace).Workspaces == nil {
|
if data.(*SharedWorkspace).Workspaces == nil {
|
||||||
data.(*SharedWorkspace).Workspaces = []string{}
|
data.(*SharedWorkspace).Workspaces = []string{}
|
||||||
}
|
}
|
||||||
@ -186,6 +185,9 @@ func (wfa *sharedWorkspaceMongoAccessor) StoreOne(data utils.DBObject) (utils.DB
|
|||||||
if data.(*SharedWorkspace).Rules == nil {
|
if data.(*SharedWorkspace).Rules == nil {
|
||||||
data.(*SharedWorkspace).Rules = []string{}
|
data.(*SharedWorkspace).Rules = []string{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
d, code, err := wfa.GenericStoreOne(data.(*SharedWorkspace), wfa)
|
||||||
|
|
||||||
if code == 200 {
|
if code == 200 {
|
||||||
wfa.sharedWorkflow(d.(*SharedWorkspace), d.GetID())
|
wfa.sharedWorkflow(d.(*SharedWorkspace), d.GetID())
|
||||||
wfa.sharedWorkspace(d.(*SharedWorkspace), d.GetID())
|
wfa.sharedWorkspace(d.(*SharedWorkspace), d.GetID())
|
||||||
|
Loading…
Reference in New Issue
Block a user