mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-02-01 22:47:40 +00:00
fix: return correct mimetype for openapi docs.json
Resolves https://github.com/go-vikunja/vikunja/issues/864
This commit is contained in:
@@ -36,13 +36,8 @@ func DocsJSON(c echo.Context) error {
|
||||
log.Error(err.Error())
|
||||
return echo.NewHTTPError(http.StatusInternalServerError).SetInternal(err)
|
||||
}
|
||||
_, err = c.Response().Write([]byte(doc))
|
||||
if err != nil {
|
||||
log.Error(err.Error())
|
||||
return echo.NewHTTPError(http.StatusInternalServerError).SetInternal(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
return c.Blob(http.StatusOK, echo.MIMEApplicationJSON, []byte(doc))
|
||||
}
|
||||
|
||||
// RedocUI serves everything needed to provide the redoc ui
|
||||
|
||||
Reference in New Issue
Block a user