Migrate utils
This commit is contained in:
parent
37872dda87
commit
10bcfe65b2
@ -2,11 +2,13 @@ package mycoopts
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"git.sr.ht/~bouncepaw/mycomarkup/v5/options"
|
||||
|
||||
"github.com/bouncepaw/mycorrhiza/internal/cfg"
|
||||
"github.com/bouncepaw/mycorrhiza/internal/hyphae"
|
||||
"github.com/bouncepaw/mycorrhiza/interwiki"
|
||||
"github.com/bouncepaw/mycorrhiza/util"
|
||||
|
||||
"git.sr.ht/~bouncepaw/mycomarkup/v5/options"
|
||||
)
|
||||
|
||||
func MarkupOptions(hyphaName string) options.Options {
|
||||
|
||||
@ -3,7 +3,7 @@ package util
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"log"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@ -82,7 +82,7 @@ func HyphaNameFromRq(rq *http.Request, actions ...string) string {
|
||||
return CanonicalName(strings.TrimPrefix(p, "/"+action+"/"))
|
||||
}
|
||||
}
|
||||
log.Println("HyphaNameFromRq: this request is invalid, fall back to home hypha")
|
||||
slog.Info("HyphaNameFromRq: this request is invalid, fall back to home hypha")
|
||||
return cfg.HomeHypha
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user