admin/sync: import theme introductions
This commit is contained in:
parent
39b57119fe
commit
ea3f3b709d
4 changed files with 34 additions and 22 deletions
|
@ -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) {
|
||||
|
|
Reference in a new issue