Speichere Konfiguration in config/config.json

This commit is contained in:
Gonne 2022-09-19 14:46:16 +02:00
parent 43b3631da2
commit c38286bcc5
14 changed files with 249 additions and 78 deletions

View file

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