Migrate utils

This commit is contained in:
Timur Ismagilov 2024-09-07 22:31:13 +03:00
parent 37872dda87
commit 10bcfe65b2
2 changed files with 5 additions and 3 deletions

View File

@ -2,11 +2,13 @@ package mycoopts
import ( import (
"errors" "errors"
"git.sr.ht/~bouncepaw/mycomarkup/v5/options"
"github.com/bouncepaw/mycorrhiza/internal/cfg" "github.com/bouncepaw/mycorrhiza/internal/cfg"
"github.com/bouncepaw/mycorrhiza/internal/hyphae" "github.com/bouncepaw/mycorrhiza/internal/hyphae"
"github.com/bouncepaw/mycorrhiza/interwiki" "github.com/bouncepaw/mycorrhiza/interwiki"
"github.com/bouncepaw/mycorrhiza/util" "github.com/bouncepaw/mycorrhiza/util"
"git.sr.ht/~bouncepaw/mycomarkup/v5/options"
) )
func MarkupOptions(hyphaName string) options.Options { func MarkupOptions(hyphaName string) options.Options {

View File

@ -3,7 +3,7 @@ package util
import ( import (
"crypto/rand" "crypto/rand"
"encoding/hex" "encoding/hex"
"log" "log/slog"
"net/http" "net/http"
"strings" "strings"
@ -82,7 +82,7 @@ func HyphaNameFromRq(rq *http.Request, actions ...string) string {
return CanonicalName(strings.TrimPrefix(p, "/"+action+"/")) 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 return cfg.HomeHypha
} }