This commit is contained in:
mr 2024-07-26 16:41:08 +02:00
parent 87b7cda0ce
commit fd64d423be

View File

@ -1,6 +1,8 @@
package utils
import (
"fmt"
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
"cloud.o-forge.io/core/oc-lib/logs"
"github.com/go-playground/validator/v10"
@ -43,6 +45,7 @@ func (dma *AbstractAccessor) SetLogger(t DataType) {
func (wfa *AbstractAccessor) GenericStoreOne(data DBObject, accessor Accessor) (DBObject, int, error) {
data.GenerateID()
fmt.Println(data.Serialize())
err := validate.Struct(data)
if err != nil {
return nil, 422, err