diff --git a/controllers/booking.go b/controllers/booking.go index 02fc01e..5b248ee 100644 --- a/controllers/booking.go +++ b/controllers/booking.go @@ -102,7 +102,8 @@ func (o *BookingController) Post() { json.Unmarshal(o.Ctx.Input.CopyBody(10000), &resp) dc_id := resp.ResourceID res := oclib.Search(&dbs.Filters{And: map[string][]dbs.Filter{ - "datacenter_resource_id": {{Operator: dbs.EQUAL.String(), Value: dc_id}}, + "workflowexecution.workflow_id": {{Operator: dbs.EQUAL.String(), Value: resp.WorkflowID}}, + "datacenter_resource_id": {{Operator: dbs.EQUAL.String(), Value: dc_id}}, }}, "", oclib.LibDataEnum(oclib.BOOKING)) if res.Code != 200 { o.Data["json"] = map[string]interface{}{ diff --git a/docker-compose.yml b/docker-compose.yml index 8582f32..68f246d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: - MONGO_DATABASE=DC_myDC image: 'oc-datacenter:latest' ports: - - 8091:8080 + - 8092:8080 container_name: oc-datacenter networks: - catalog diff --git a/go.mod b/go.mod index f31bf39..a4117d3 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( ) require ( - cloud.o-forge.io/core/oc-lib v0.0.0-20240813084212-4911e32ec215 // indirect + cloud.o-forge.io/core/oc-lib v0.0.0-20240813123326-2d9b4587ac95 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/beego/bee/v2 v2.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index 9f4fce5..fce7fd1 100644 --- a/go.sum +++ b/go.sum @@ -116,6 +116,8 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20240812123133-4575f9ad3f84 h1:nz7VVbT2cQW80 cloud.o-forge.io/core/oc-lib v0.0.0-20240812123133-4575f9ad3f84/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo= cloud.o-forge.io/core/oc-lib v0.0.0-20240813084212-4911e32ec215 h1:Ra1RbFC41IFxJa38krCOHqWcTZvHj8W7FDPKcGnDIuw= cloud.o-forge.io/core/oc-lib v0.0.0-20240813084212-4911e32ec215/go.mod h1:tFM1H8v+lpHt+dTZAhYmYXu3eF+wOEd+HtcOiUbCCvQ= +cloud.o-forge.io/core/oc-lib v0.0.0-20240813123326-2d9b4587ac95 h1:YxgRbjwoBYMW/js9kc+9GJkg3rXrFF/cMXzTAJSM96M= +cloud.o-forge.io/core/oc-lib v0.0.0-20240813123326-2d9b4587ac95/go.mod h1:tFM1H8v+lpHt+dTZAhYmYXu3eF+wOEd+HtcOiUbCCvQ= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=