bugfix: call collect.Decode before get() (#507)

* add models.user.i18n

* bugfix: call collect.Decode before get()
This commit is contained in:
yubo 2021-01-13 12:34:44 +08:00 committed by GitHub
parent c182c70b8d
commit a88315ee74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -24,9 +24,9 @@ type CollectRule struct {
Data json.RawMessage `json:"data"`
Tags string `json:"tags" description:"k1=v1,k2=v2,k3=v3,..."`
Creator string `json:"creator" description:"just for output"`
LastUpdator string `xorm:"last_updator" json:"last_updator" description:"just for output"`
Created time.Time `xorm:"updated" json:"created" description:"just for output"`
LastUpdated time.Time `xorm:"updated" json:"last_updated" description:"just for output"`
LastUpdator string `json:"last_updator" description:"just for output"`
Created time.Time `json:"created" description:"just for output"`
LastUpdated time.Time `json:"last_updated" description:"just for output"`
}
type validator interface {

View File

@ -29,6 +29,7 @@ func (p ApiCollector) Get(id int64) (interface{}, error) {
if !has {
return nil, err
}
collect.Decode()
return collect, err
}

View File

@ -29,6 +29,7 @@ func (p LogCollector) Get(id int64) (interface{}, error) {
if !has {
return nil, err
}
collect.Decode()
return collect, err
}