admin/sync: import theme introductions

This commit is contained in:
nemunaire 2017-12-21 22:17:41 +01:00
parent 39b57119fe
commit ea3f3b709d
4 changed files with 34 additions and 22 deletions

View file

@ -109,6 +109,7 @@ func showThemedExercice(theme fic.Theme, exercice fic.Exercice, body []byte) (in
type uploadedTheme struct {
Name string
Authors string
Intro string
}
func createTheme(_ httprouter.Params, body []byte) (interface{}, error) {
@ -121,7 +122,7 @@ func createTheme(_ httprouter.Params, body []byte) (interface{}, error) {
return nil, errors.New("Theme's name not filled")
}
return fic.CreateTheme(ut.Name, ut.Authors)
return fic.CreateTheme(ut.Name, ut.Authors, ut.Intro)
}
func updateTheme(theme fic.Theme, body []byte) (interface{}, error) {