models
This commit is contained in:
parent
87b7cda0ce
commit
fd64d423be
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user