frontend: beautiful URLs
This commit is contained in:
parent
bd75157a79
commit
0c540a39eb
13 changed files with 54 additions and 31 deletions
|
@ -120,7 +120,7 @@ func createExercice(theme fic.Theme, body []byte) (interface{}, error) {
|
|||
}
|
||||
}
|
||||
|
||||
return theme.AddExercice(ue.Title, ue.Path, ue.Statement, ue.Overview, depend, ue.Gain, ue.VideoURI)
|
||||
return theme.AddExercice(ue.Title, ue.URLId, ue.Path, ue.Statement, ue.Overview, depend, ue.Gain, ue.VideoURI)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ func showThemedExercice(theme fic.Theme, exercice fic.Exercice, body []byte) (in
|
|||
|
||||
type uploadedTheme struct {
|
||||
Name string
|
||||
URLId string
|
||||
Authors string
|
||||
Intro string
|
||||
}
|
||||
|
@ -122,7 +123,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, ut.Intro)
|
||||
return fic.CreateTheme(ut.Name, ut.URLId, ut.Authors, ut.Intro)
|
||||
}
|
||||
|
||||
func updateTheme(theme fic.Theme, body []byte) (interface{}, error) {
|
||||
|
|
Reference in a new issue