validator err test

This commit is contained in:
mr 2024-07-19 09:41:13 +02:00
parent c494dba5ab
commit 694957a483

View File

@ -1,6 +1,8 @@
package oclib
import (
"fmt"
"cloud.o-forge.io/core/oc-lib/dbs/mongo"
"cloud.o-forge.io/core/oc-lib/models/utils"
)
@ -19,6 +21,7 @@ func (wfa *WorkflowMongoAccessor) UpdateOne(set map[string]interface{}, id strin
func (wfa *WorkflowMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject, error) {
err := utils.Validate.Struct(data)
fmt.Println(err)
if err != nil {
return nil, err
}