validator use test
This commit is contained in:
@@ -36,8 +36,7 @@ func Init(appName string) {
|
||||
}
|
||||
|
||||
func GetLogger() zerolog.Logger {
|
||||
log := logs.GetLogger()
|
||||
return log
|
||||
return logs.GetLogger()
|
||||
}
|
||||
|
||||
func LoadOne(collection LibDataEnum, id string) LibData {
|
||||
@@ -46,7 +45,9 @@ func LoadOne(collection LibDataEnum, id string) LibData {
|
||||
}
|
||||
|
||||
func UpdateOne(collection LibDataEnum, set map[string]interface{}, id string) LibData {
|
||||
d, err := models.Model(collection.EnumIndex()).GetAccessor().UpdateOne(set, id)
|
||||
model := models.Model(collection.EnumIndex())
|
||||
set = model.Deserialize(set).Serialize()
|
||||
d, err := model.GetAccessor().UpdateOne(set, id)
|
||||
return LibData{Data: d, Err: err}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user