Compare commits
2 commits
9632545d94
...
e32d5023aa
Author | SHA1 | Date | |
---|---|---|---|
e32d5023aa | |||
ba839a2e86 |
2 changed files with 3 additions and 3 deletions
|
@ -107,8 +107,8 @@ func (r *RequestRepo) Execute(request models.Request) error {
|
|||
_, err = r.db.Exec("UPDATE officeHour SET active=true WHERE id=?", request.OfficeHour.Id)
|
||||
r.db.Exec("DELETE FROM request WHERE officeHour=?", request.OfficeHour.Id)
|
||||
case models.RequestDelete:
|
||||
err = r.officeHourRepo.Delete(request.OfficeHour)
|
||||
r.db.Exec("DELETE FROM request WHERE officeHour=?", request.OfficeHour.Id)
|
||||
err = r.officeHourRepo.Delete(request.OfficeHour)
|
||||
default:
|
||||
log.Printf("Executing request: Action type %d unknown.", request.Action)
|
||||
_, err = r.db.Exec("DELETE FROM request WHERE id=?", request.Id)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From: {{.Config.Mailer.FromName}}
|
||||
To: {{.Request.OfficeHour.Tutor.Email}}
|
||||
Subject: Sprechstunde {{if eq .Request.Action 1}}anlegen{{end}}{{if eq .Request.Action 2}}löschen{{end}}
|
||||
Subject: Sprechstunde {{if eq .Request.Action 0}}anlegen{{end}}{{if eq .Request.Action 1}}löschen{{end}}
|
||||
Message-Id: {{.MessageId}}
|
||||
|
||||
Hallo {{.Request.OfficeHour.Tutor.Name}},
|
||||
|
||||
mit deiner Emailadresse soll eine Sprechstunde mit folgenden Daten {{if eq .Request.Action 1}}angelegt werden{{end}}{{if eq .Request.Action 2}}gelöscht werden{{end}}:
|
||||
mit deiner Emailadresse soll eine Sprechstunde mit folgenden Daten {{if eq .Request.Action 0}}angelegt werden{{end}}{{if eq .Request.Action 1}}gelöscht werden{{end}}:
|
||||
|
||||
{{.Request.OfficeHour.Course.Name}}
|
||||
{{DayName .Request.OfficeHour.Date.Day}}
|
||||
|
|
Loading…
Reference in a new issue