#4 Feature/allow DELETE http method in Success function

Yhdistetty
Paul yhdistetty 1 committia lähteestä Wendell/pkg:feature/allow-delete-method kohteeseen master 7 vuotta sitten
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1
    1
      request/request.go

+ 1
- 1
request/request.go Näytä tiedosto

@@ -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)