|
@@ -3,7 +3,6 @@ package rest
|
|
|
import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
- "log"
|
|
|
"reflect"
|
|
|
"strings"
|
|
|
|
|
@@ -148,17 +147,7 @@ func fieldVal(val reflect.Value, fieldName string, files RequestFiles, names ...
|
|
|
}
|
|
|
}
|
|
|
if !field.IsValid() {
|
|
|
- /*
|
|
|
- log.Println("invalid")
|
|
|
- log.Printf("%T\n", val.Interface())
|
|
|
- if f, check := val.Interface().(IFieldChecker); check {
|
|
|
- log.Println("ifieldchecker")
|
|
|
- if check := f.RestFieldCheck(fieldName); check {
|
|
|
- return true
|
|
|
- }
|
|
|
- }
|
|
|
- err = ErrorFiled(rField.Name, "field is not found")
|
|
|
- */
|
|
|
+ // возвращаем true потому что поле может быть кастомным и объявлено позже, если объект реализовн как интерфейс RestFileldsPost
|
|
|
return true
|
|
|
}
|
|
|
var fVal reflect.Value
|
|
@@ -303,9 +292,7 @@ func OutFields(req IRequestIn, obj any, files RequestFiles, names ...any) IReque
|
|
|
|
|
|
func OutFieldsReq(req IRequestIn, obj any, files RequestFiles, names ...any) IRequestOut {
|
|
|
if len(names) == 0 {
|
|
|
- log.Println("names check...")
|
|
|
names = req.RData().Slice("fields", nil)
|
|
|
}
|
|
|
- log.Println("NAMES....", names)
|
|
|
return OutFields(req, obj, files, names...)
|
|
|
}
|