feat: schema migration handler (#100)

* chore: update about site dialog

* feat: schema migration

* chore: lint with golangci
This commit is contained in:
boojack
2022-07-02 10:47:16 +08:00
committed by GitHub
parent 3c58953e56
commit 536627007d
12 changed files with 245 additions and 91 deletions

View File

@@ -261,7 +261,10 @@ func (s *Server) registerWebhookRoutes(g *echo.Group) {
c.Response().Writer.WriteHeader(http.StatusOK)
c.Response().Writer.Header().Set("Content-Type", resource.Type)
c.Response().Writer.Write(resource.Blob)
if _, err := c.Response().Writer.Write(resource.Blob); err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to write response").SetInternal(err)
}
return nil
})
}