admin: Use branch indication to access the repo

This commit is contained in:
nemunaire 2023-06-17 00:24:27 +02:00
parent 61ec7a56f5
commit 34f175e57b

View File

@ -205,7 +205,7 @@ func (i GitImporter) GetThemeLink(th *fic.Theme) (u *url.URL, err error) {
return
}
u.Path = path.Join(u.Path, "-", "tree", "main", strings.TrimPrefix(th.Path, prefix))
u.Path = path.Join(u.Path, "-", "tree", i.Branch, strings.TrimPrefix(th.Path, prefix))
return
}
@ -241,7 +241,7 @@ func (i GitImporter) GetExerciceLink(e *fic.Exercice) (u *url.URL, err error) {
return
}
u.Path = path.Join(u.Path, "-", "tree", "main", strings.TrimPrefix(e.Path, prefix))
u.Path = path.Join(u.Path, "-", "tree", i.Branch, strings.TrimPrefix(e.Path, prefix))
return
}