1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-10-31 23:53:01 +00:00

Use the Hypher interface in a lot of places

This commit is contained in:
Timur Ismagilov
2022-02-04 02:47:36 +05:00
committed by Timur Ismagilov
parent ff10d577d2
commit 927ac4f1da
15 changed files with 82 additions and 75 deletions

View File

@@ -35,7 +35,7 @@ func initMutators(r *mux.Router) {
func factoryHandlerAsker(
actionPath string,
asker func(*user.User, *hyphae.Hypha, *l18n.Localizer) (string, error),
asker func(*user.User, hyphae.Hypher, *l18n.Localizer) (string, error),
succTitleKey string,
succPageTemplate func(*http.Request, string, bool) string,
) func(http.ResponseWriter, *http.Request) {

View File

@@ -145,7 +145,7 @@ func handlerRandom(w http.ResponseWriter, rq *http.Request) {
i := rand.Intn(amountOfHyphae)
for h := range hyphae.YieldExistingHyphae() {
if i == 0 {
randomHyphaName = h.Name
randomHyphaName = h.CanonicalName()
}
i--
}