removed code used for test from CreateSource()
This commit is contained in:
parent
b35f1c5ff3
commit
3bbb15c459
@ -123,23 +123,7 @@ func (c *AdmiraltyController) GetOneTarget() {
|
||||
// @Success 200
|
||||
// @router /source/:id [post]
|
||||
func (c *AdmiraltyController) CreateSource() {
|
||||
var data KubeInfo
|
||||
json.Unmarshal(c.Ctx.Input.CopyBody(10000000),&data)
|
||||
if data.Url == nil || data.KubeCA == nil || data.KubeCert == nil|| data.KubeKey == nil {
|
||||
c.Ctx.Output.SetStatus(500)
|
||||
c.ServeJSON()
|
||||
missingData := fmt.Sprint(data)
|
||||
c.Data["json"] = map[string]string{"error" : "Missing something in " + missingData}
|
||||
c.ServeJSON()
|
||||
}
|
||||
fmt.Println("")
|
||||
fmt.Println("URL : %v", data.Url)
|
||||
fmt.Println("")
|
||||
fmt.Println("CA : %v", data.KubeCA)
|
||||
fmt.Println("")
|
||||
fmt.Println("Key : ", data.KubeKey)
|
||||
|
||||
|
||||
execution := c.Ctx.Input.Param(":execution")
|
||||
serv, err := infrastructure.NewKubernetesService()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user