UpdateSystem updates a system configuration
(db *DB, key, val interface{})
| 62 | |
| 63 | // UpdateSystem updates a system configuration |
| 64 | func UpdateSystem(db *DB, key, val interface{}) error { |
| 65 | if _, err := db.Exec("UPDATE system SET value = ? WHERE key = ?", val, key); err != nil { |
| 66 | return errors.Wrap(err, "updating system config") |
| 67 | } |
| 68 | |
| 69 | return nil |
| 70 | } |
| 71 | |
| 72 | // DeleteSystem delets the given system record |
| 73 | func DeleteSystem(db *DB, key string) error { |