On work/survey update, regenerate description from markdown
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-16 12:14:26 +02:00
parent 5b3bdb0429
commit 7f7561ad3e
2 changed files with 3 additions and 0 deletions

View file

@ -345,6 +345,7 @@ func (w *Work) Update() (*Work, error) {
if _, err := DBExec("UPDATE works SET title = ?, promo = ?, grp = ?, shown = ?, description = ?, tag = ?, submission_url = ?, corrected = ?, start_availability = ?, end_availability = ? WHERE id_work = ?", w.Title, w.Promo, w.Group, w.Shown, w.DescriptionRaw, w.Tag, w.SubmissionURL, w.Corrected, w.StartAvailability, w.EndAvailability, w.Id); err != nil {
return nil, err
} else {
w.Description = string(blackfriday.Run([]byte(w.DescriptionRaw)))
return w, err
}
}