Browse Source

修改参数bind方式

gitlink
Sydonian 1 year ago
parent
commit
d64cf26f1d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      client/internal/http/object.go

+ 1
- 1
client/internal/http/object.go View File

@@ -53,7 +53,7 @@ func (s *ObjectService) ListByIDs(ctx *gin.Context) {
log := logger.WithField("HTTP", "Object.ListByIDs")

var req cdsapi.ObjectListByIDs
if err := ctx.ShouldBindJSON(&req); err != nil {
if err := ctx.ShouldBindQuery(&req); err != nil {
log.Warnf("binding body: %s", err.Error())
ctx.JSON(http.StatusBadRequest, Failed(errorcode.BadArgument, "missing argument or invalid argument"))
return


Loading…
Cancel
Save