validator err test
This commit is contained in:
parent
c494dba5ab
commit
694957a483
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user