admin: Add /exercices pages to get all exercices of a theme
This commit is contained in:
parent
c9e4d3e27c
commit
ad6199269b
@ -84,7 +84,15 @@ func listTheme(args []string, body []byte) (interface{}, error) {
|
||||
}
|
||||
}
|
||||
} else if len(args) == 2 {
|
||||
return getExercice(args)
|
||||
if args[1] == "exercices" {
|
||||
if theme, err := getTheme(args); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return theme.GetExercices()
|
||||
}
|
||||
} else {
|
||||
return getExercice(args)
|
||||
}
|
||||
} else if len(args) == 1 {
|
||||
if args[0] == "themes.json" {
|
||||
return exportThemes()
|
||||
|
Loading…
Reference in New Issue
Block a user