added node to the returned data when it was found
This commit is contained in:
parent
b08e6a1e70
commit
4bfb16cba6
@ -345,6 +345,8 @@ func (c *AdmiraltyController) GetNodeReady(){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resp, err := serv.GetKubeconfigSecret(c.Ctx.Request.Context(),execution)
|
resp, err := serv.GetKubeconfigSecret(c.Ctx.Request.Context(),execution)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// change code to 500
|
// change code to 500
|
||||||
@ -359,7 +361,6 @@ func (c *AdmiraltyController) GetNodeReady(){
|
|||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Extract JWT token RS265 encoded
|
// Extract JWT token RS265 encoded
|
||||||
var editedKubeconfig map[string]interface{}
|
var editedKubeconfig map[string]interface{}
|
||||||
@ -393,14 +394,15 @@ func (c *AdmiraltyController) GetNodeReady(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if *isExpired {
|
if *isExpired {
|
||||||
c.Data["json"] = map[string]string{
|
c.Data["json"] = map[string]interface{}{
|
||||||
"token" : "token in the secret is expired and must be regenerated",
|
"token" : "token in the secret is expired and must be regenerated",
|
||||||
|
"node": node,
|
||||||
}
|
}
|
||||||
c.Ctx.Output.SetStatus(410)
|
c.Ctx.Output.SetStatus(410)
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Data["json"] = map[string]bool{"ok": true}
|
c.Data["json"] = map[string]interface{}{"node": node,"token": true}
|
||||||
c.ServeJSON()
|
c.ServeJSON()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user