Fix wrong params naming in openpitrix (#5666)

This commit is contained in:
AS!
2023-05-09 13:54:45 +08:00
committed by GitHub
parent 673fdde52c
commit e140fb387c
2 changed files with 8 additions and 10 deletions

View File

@@ -766,13 +766,12 @@ func (h *openpitrixHandler) UpgradeApplication(req *restful.Request, resp *restf
}
upgradeClusterRequest.Namespace = namespace
upgradeClusterRequest.ClusterId = applicationId
user, _ := request.UserFrom(req.Request.Context())
if user != nil {
upgradeClusterRequest.Username = user.GetName()
}
err = h.openpitrix.UpgradeApplication(upgradeClusterRequest)
err = h.openpitrix.UpgradeApplication(upgradeClusterRequest, applicationId)
if err != nil {
klog.Errorln(err)
api.HandleInternalError(resp, nil, err)