Protecting Created Date, updating docs, changin errors to JSON

This commit is contained in:
2018-11-16 11:48:45 +01:00
parent cb7a46617d
commit dc1778a5b9
12 changed files with 86 additions and 46 deletions

View File

@@ -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)
}