Cloudmigration: decode json data (#85548)
* decode get * decode bytes * response * . * linter * quick fixes --------- Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com>
This commit is contained in:
co-authored by
Michael Mandrus
parent
e4c92483dc
commit
a457ab3192
@@ -271,7 +271,14 @@ func (cma *CloudMigrationAPI) GetMigrationRun(c *contextmodel.ReqContext) respon
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "migration status error", err)
|
||||
}
|
||||
return response.JSON(http.StatusOK, migrationStatus)
|
||||
|
||||
runResponse, err := migrationStatus.ToResponse()
|
||||
if err != nil {
|
||||
cma.log.Error("could not return migration run", "err", err)
|
||||
return response.Error(http.StatusInternalServerError, "migration run get error", err)
|
||||
}
|
||||
|
||||
return response.JSON(http.StatusOK, runResponse)
|
||||
}
|
||||
|
||||
// swagger:parameters getCloudMigrationRun
|
||||
|
||||
Reference in New Issue
Block a user