frontend: beautiful URLs

This commit is contained in:
nemunaire 2018-01-18 11:07:50 +01:00 committed by nemunaire
commit 0c540a39eb
13 changed files with 54 additions and 31 deletions

View file

@ -98,7 +98,7 @@ func SyncExercices(i Importer, theme fic.Theme) []string {
}
if e, err := theme.GetExerciceByTitle(ename); err != nil {
if ex, err := theme.AddExercice(ename, path.Join(theme.Name, edir), statement, overview, nil, gain, videoURI); err != nil {
if ex, err := theme.AddExercice(ename, fic.ToURLid(ename), path.Join(theme.Name, edir), statement, overview, nil, gain, videoURI); err != nil {
errs = append(errs, fmt.Sprintf("%q: error on exercice add: %s", edir, err))
continue
} else {