Protecting Created Date, updating docs, changin errors to JSON
This commit is contained in:
@@ -128,6 +128,7 @@ func UpdateCompanyUserById(o orm.Ormer, m *CompanyUser) (err error) {
|
||||
// ascertain id exists in the database
|
||||
if err = o.Read(&v); err == nil {
|
||||
var num int64
|
||||
m.Created = v.Created
|
||||
if num, err = o.Update(m); err == nil {
|
||||
fmt.Println("Number of records updated in database:", num)
|
||||
}
|
||||
|
Reference in New Issue
Block a user