This commit is contained in:
pb
2025-04-29 11:55:15 +02:00
8 changed files with 67 additions and 74 deletions

View File

@@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"oc-datacenter/infrastructure"
"strings"
"time"
oclib "cloud.o-forge.io/core/oc-lib"
@@ -247,19 +246,11 @@ func (o *BookingController) Post() {
o.ServeJSON()
return
}
if err := o.createNamespace(resp.ExecutionsID); err != nil {
if strings.Contains(err.Error(), "already exists") {
err = nil
} else {
o.Data["json"] = map[string]interface{}{
"data": nil,
"code": 500,
"error": err.Error(),
}
o.ServeJSON()
return
}
}
/*if err := o.createNamespace(resp.ExecutionsID); err != nil {
fmt.Println(err.Error())
}*/
o.Data["json"] = map[string]interface{}{
"data": []interface{}{b},
"code": 200,