Speichere Konfiguration in config/config.json
This commit is contained in:
parent
43b3631da2
commit
c38286bcc5
14 changed files with 249 additions and 78 deletions
|
@ -114,7 +114,10 @@ func (r *OfficeHourRepo) Add(officeHour models.OfficeHour) (id int, err error) {
|
|||
|
||||
func (r *OfficeHourRepo) Delete(officeHour models.OfficeHour) error {
|
||||
_, err := r.db.Exec("DELETE FROM officeHour WHERE id=?", officeHour.Id)
|
||||
return fmt.Errorf("Error deleting officeHour from database: %s", err.Error())
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error deleting officeHour from database: %s", err.Error())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *OfficeHourRepo) getFromRow(row *sql.Row) (models.OfficeHour, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue