瀏覽代碼

no blob response

Michael Yang 1 年之前
父節點
當前提交
bc22d5a38b
共有 2 個文件被更改,包括 2 次插入6 次删除
  1. 0 4
      api/types.go
  2. 2 2
      server/routes.go

+ 0 - 4
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"`
 }

+ 2 - 2
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{