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:
Leonard Gram
2024-04-03 18:47:49 +02:00
committed by GitHub
co-authored by Michael Mandrus
parent e4c92483dc
commit a457ab3192
3 changed files with 21 additions and 4 deletions
+8 -1
View File
@@ -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