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
|
@ -311,6 +311,8 @@ func (q *Question) Update() (*Question, error) {
|
|||
if _, err := DBExec("UPDATE survey_quests SET id_survey = ?, title = ?, description = ?, placeholder = ?, kind = ? WHERE id_question = ?", q.IdSurvey, q.Title, q.DescriptionRaw, q.Placeholder, q.Kind, q.Id); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
q.Description = string(blackfriday.Run([]byte(q.DescriptionRaw)))
|
||||
|
||||
_questions_cache_mutex.Lock()
|
||||
_questions_cache[q.Id] = q
|
||||
_questions_cache_mutex.Unlock()
|
||||
|
|
Reference in a new issue