On work/survey update, regenerate description from markdown
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5b3bdb0429
commit
7f7561ad3e
2 changed files with 3 additions and 0 deletions
1
works.go
1
works.go
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue