admin: Export more importer functions

This commit is contained in:
nemunaire 2023-11-25 17:13:31 +01:00
commit 1f833d39fc
7 changed files with 26 additions and 26 deletions

View file

@ -31,11 +31,11 @@ func GetExercices(i Importer, theme *fic.Theme) ([]string, error) {
if len(theme.Path) == 0 {
return []string{}, nil
} else if dirs, err := i.listDir(theme.Path); err != nil {
} else if dirs, err := i.ListDir(theme.Path); err != nil {
return []string{}, err
} else {
for _, dir := range dirs {
if _, err := i.listDir(path.Join(theme.Path, dir)); err == nil {
if _, err := i.ListDir(path.Join(theme.Path, dir)); err == nil {
if dir[0] != '.' && strings.Contains(dir, "-") {
exercices = append(exercices, dir)
}