Working update
This commit is contained in:
parent
e9eeac3738
commit
6567dc68a5
@ -97,7 +97,7 @@ func (o *CollaborativeAreaController) Get() {
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
// @Title Add Workspace
|
||||
// @Title Remove Workspace
|
||||
// @Description find shared workspace by id
|
||||
// @Param id path string true "the id you want to get"
|
||||
// @Param id2 path string true "the id you want to add"
|
||||
@ -135,17 +135,14 @@ func (o *CollaborativeAreaController) RemoveWorkflow() {
|
||||
id := o.Ctx.Input.Param(":id")
|
||||
id2 := o.Ctx.Input.Param(":id2")
|
||||
r := oclib.LoadOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), id)
|
||||
fmt.Println("RemoveWorkflow", r)
|
||||
shared := r.ToCollaborativeArea()
|
||||
newWorkflows := []string{}
|
||||
if slices.Contains(shared.Workflows, id2) {
|
||||
for _, w := range shared.Workflows {
|
||||
if w != id2 {
|
||||
newWorkflows = append(newWorkflows, w)
|
||||
}
|
||||
for _, w := range shared.Workflows {
|
||||
if w != id2 {
|
||||
newWorkflows = append(newWorkflows, w)
|
||||
}
|
||||
shared.Workflows = newWorkflows
|
||||
}
|
||||
shared.Workflows = newWorkflows
|
||||
o.Data["json"] = oclib.UpdateOne(oclib.LibDataEnum(tools.COLLABORATIVE_AREA), shared.Serialize(), id, caller)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.22.0
|
||||
toolchain go1.22.4
|
||||
|
||||
require (
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241114090218-14fe694fd370
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119132823-94803f820af1
|
||||
github.com/beego/beego/v2 v2.3.1
|
||||
)
|
||||
|
||||
|
12
go.sum
12
go.sum
@ -26,6 +26,18 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20241108104423-7fd44a55cb28 h1:jekSPkD/b59kJ
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241108104423-7fd44a55cb28/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241114090218-14fe694fd370 h1:3o0naAyt9oXs/dG4eygreVePBmjd516PEZrW9aviJ0Q=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241114090218-14fe694fd370/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119090846-3b8079ca87ad h1:4TEFD4QpSIO0hJsQ4Erj/cSelXvuSmxe19i/gYtil5o=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119090846-3b8079ca87ad/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119110114-603641a589f3 h1:dRVc/Kg1ubNL6SVBMC/GFUS4+ihfe3gw/JcmfjOb0/w=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119110114-603641a589f3/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119122801-aab0d54dfa2b h1:M1ml1CMgjbscRNx36KrbGOIXWMka7freUqGlL2vYntA=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119122801-aab0d54dfa2b/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119124114-cfcad2343de7 h1:fao48ZRWAPagD6SeFfmct9KaOUYJUvgDhdGAYMcQUWw=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119124114-cfcad2343de7/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119130341-898700d127b5 h1:eMY6tisbBCRq42rBDhiDoXjlQmbMc/kF0z5yZRASu7M=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119130341-898700d127b5/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119132823-94803f820af1 h1:c/gsB3C14u3f8PetaN24+lDfp/Bc1zL8UUj6kE0TWrQ=
|
||||
cloud.o-forge.io/core/oc-lib v0.0.0-20241119132823-94803f820af1/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/beego/beego/v2 v2.3.0 h1:iECVwzm6egw6iw6tkWrEDqXG4NQtKLQ6QBSYqlM6T/I=
|
||||
github.com/beego/beego/v2 v2.3.0/go.mod h1:Ob/5BJ9fIKZLd4s9ZV3o9J6odkkIyL83et+p98gyYXo=
|
||||
|
Loading…
Reference in New Issue
Block a user