API Response implements http.ResponseWriter (#32046)

* rename response.Header -> response.SetHeader to free up method name for http.ResponseWriter ifc

* normalresponse implements http.ResponseWriter
This commit is contained in:
Owen Diehl
2021-03-17 13:12:28 -04:00
committed by GitHub
parent 36614b03f7
commit 7a4ab13a79
4 changed files with 28 additions and 11 deletions

View File

@ -561,10 +561,10 @@ func CalculateDashboardDiff(c *models.ReqContext, apiOptions dtos.CalculateDiffO
}
if options.DiffType == dashdiffs.DiffDelta {
return response.Respond(200, result.Delta).Header("Content-Type", "application/json")
return response.Respond(200, result.Delta).SetHeader("Content-Type", "application/json")
}
return response.Respond(200, result.Delta).Header("Content-Type", "text/html")
return response.Respond(200, result.Delta).SetHeader("Content-Type", "text/html")
}
// RestoreDashboardVersion restores a dashboard to the given version.