平替ShouldBindJSON

This commit is contained in:
TsMask
2023-08-15 21:36:30 +08:00
parent 14520f404c
commit fea161f4aa
2 changed files with 3 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ import (
)
// 读取json请求结构团体
func JSONBody(r *http.Request, args any) error {
func ShouldBindJSON(r *http.Request, args any) error {
body, err := io.ReadAll(io.LimitReader(r.Body, global.RequestBodyMaxLen))
if err != nil {
return err