瀏覽代碼

Merge branch 'feature/allow-delete-method' of Wendell/pkg into master

Paul 5 年之前
父節點
當前提交
9939579380
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      request/request.go

+ 1
- 1
request/request.go 查看文件

@@ -55,7 +55,7 @@ func Success(ctx *gin.Context, data interface{}) {
55 55
 	}
56 56
 
57 57
 	switch ctx.Request.Method {
58
-	case http.MethodGet, http.MethodHead, http.MethodOptions:
58
+	case http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodDelete:
59 59
 		ctx.JSON(http.StatusOK, data)
60 60
 	case http.MethodPost, http.MethodPut, http.MethodPatch:
61 61
 		ctx.JSON(http.StatusCreated, data)