1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-11-08 19:43:39 +00:00

New structure

This commit is contained in:
handlerug
2021-06-19 11:51:10 +07:00
parent b90c288549
commit 7b2423ec40
10 changed files with 74 additions and 115 deletions

View File

@@ -2,12 +2,14 @@ package web
// stuff.go is used for meta stuff about the wiki or all hyphae at once.
import (
"github.com/bouncepaw/mycorrhiza/cfg"
"io"
"log"
"math/rand"
"net/http"
"github.com/bouncepaw/mycorrhiza/cfg"
"github.com/bouncepaw/mycorrhiza/files"
"github.com/bouncepaw/mycorrhiza/hyphae"
"github.com/bouncepaw/mycorrhiza/shroom"
"github.com/bouncepaw/mycorrhiza/user"
@@ -41,9 +43,8 @@ func handlerReindex(w http.ResponseWriter, rq *http.Request) {
return
}
hyphae.ResetCount()
log.Println("Wiki storage directory is", cfg.WikiDir)
log.Println("Start indexing hyphae...")
hyphae.Index(cfg.WikiDir)
log.Println("Reindexing hyphae in", files.HyphaeDir())
hyphae.Index(files.HyphaeDir())
log.Println("Indexed", hyphae.Count(), "hyphae")
http.Redirect(w, rq, "/", http.StatusSeeOther)
}