Browse Source

allow delete method in Success function

Wendell Sun 6 years ago
parent
commit
3683ea3bb5
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      request/request.go

+ 1
- 1
request/request.go View File

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