|
@@ -27,7 +27,7 @@ func NewGatewayIpAdminHandler(
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) GetGatewayIpAdmin(ctx *gin.Context) {
|
|
|
var req v1admin.GatewayIp
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|
|
@@ -42,7 +42,7 @@ func (h *GatewayIpAdminHandler) GetGatewayIpAdmin(ctx *gin.Context) {
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) GetGatewayIpAdminList(ctx *gin.Context) {
|
|
|
var req v1admin.SearchGatewayIpParams
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|
|
@@ -56,7 +56,7 @@ func (h *GatewayIpAdminHandler) GetGatewayIpAdminList(ctx *gin.Context) {
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) AddGatewayIpAdmin(ctx *gin.Context) {
|
|
|
var req model.Gatewayip
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|
|
@@ -70,7 +70,7 @@ func (h *GatewayIpAdminHandler) AddGatewayIpAdmin(ctx *gin.Context) {
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) EditGatewayIpAdmin(ctx *gin.Context) {
|
|
|
var req model.Gatewayip
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|
|
@@ -84,7 +84,7 @@ func (h *GatewayIpAdminHandler) EditGatewayIpAdmin(ctx *gin.Context) {
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) DeleteGatewayIpAdmin(ctx *gin.Context) {
|
|
|
var req v1admin.GatewayIp
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|
|
@@ -98,7 +98,7 @@ func (h *GatewayIpAdminHandler) DeleteGatewayIpAdmin(ctx *gin.Context) {
|
|
|
|
|
|
func (h *GatewayIpAdminHandler) DeleteGatewayIpsAdmin(ctx *gin.Context) {
|
|
|
var req v1admin.DeleteGatewayIpRequest
|
|
|
- if err := ctx.ShouldBindJSON(&req); err != nil {
|
|
|
+ if err := ctx.ShouldBind(&req); err != nil {
|
|
|
v1.HandleError(ctx, http.StatusBadRequest, v1.ErrBadRequest, nil)
|
|
|
return
|
|
|
}
|