use correct content-type for logs
This commit is contained in:
parent
08a4bf06a5
commit
8de93539e3
2 changed files with 5 additions and 4 deletions
|
@ -26,7 +26,7 @@ func GetBuilds(c *gin.Context) {
|
|||
c.AbortWithStatus(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
c.IndentedJSON(http.StatusOK, builds)
|
||||
c.JSON(http.StatusOK, builds)
|
||||
}
|
||||
|
||||
func GetBuild(c *gin.Context) {
|
||||
|
@ -54,7 +54,7 @@ func GetBuild(c *gin.Context) {
|
|||
Jobs []*model.Job `json:"jobs"`
|
||||
}{build, jobs}
|
||||
|
||||
c.IndentedJSON(http.StatusOK, &out)
|
||||
c.JSON(http.StatusOK, &out)
|
||||
}
|
||||
|
||||
func GetBuildLast(c *gin.Context) {
|
||||
|
@ -73,7 +73,7 @@ func GetBuildLast(c *gin.Context) {
|
|||
Jobs []*model.Job `json:"jobs"`
|
||||
}{build, jobs}
|
||||
|
||||
c.IndentedJSON(http.StatusOK, &out)
|
||||
c.JSON(http.StatusOK, &out)
|
||||
}
|
||||
|
||||
func GetBuildLogs(c *gin.Context) {
|
||||
|
@ -111,6 +111,7 @@ func GetBuildLogs(c *gin.Context) {
|
|||
// TODO implement limited streaming to avoid crashing the browser
|
||||
}
|
||||
|
||||
c.Header("Content-Type", "application/json")
|
||||
stream.Copy(c.Writer, r)
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ func GetLoginToken(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
c.IndentedJSON(http.StatusOK, &tokenPayload{
|
||||
c.JSON(http.StatusOK, &tokenPayload{
|
||||
Access: tokenstr,
|
||||
Expires: exp - time.Now().Unix(),
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue