diff --git a/api/types.go b/api/types.go index 347c4f84..2a36a1f6 100644 --- a/api/types.go +++ b/api/types.go @@ -105,10 +105,6 @@ type CreateRequest struct { Stream *bool `json:"stream,omitempty"` } -type CreateBlobResponse struct { - Path string `json:"path"` -} - type DeleteRequest struct { Name string `json:"name"` } diff --git a/server/routes.go b/server/routes.go index b3998e5c..9ebe273c 100644 --- a/server/routes.go +++ b/server/routes.go @@ -662,7 +662,7 @@ func HeadBlobHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, api.CreateBlobResponse{Path: path}) + c.Status(http.StatusOK) } func CreateBlobHandler(c *gin.Context) { @@ -701,7 +701,7 @@ func CreateBlobHandler(c *gin.Context) { return } - c.JSON(http.StatusOK, api.CreateBlobResponse{Path: targetPath}) + c.Status(http.StatusCreated) } var defaultAllowOrigins = []string{