summaryrefslogtreecommitdiff
path: root/app/router.go
diff options
context:
space:
mode:
authorlost+skunk <[email protected]>2024-08-01 22:48:05 +0300
committerlost+skunk <[email protected]>2024-08-01 22:48:05 +0300
commitc5514c3875b9b782688047d547dfd6663a5b77bb (patch)
treee9b8dc3f90aa6b09b8f5006f1e4d16e2bf4718c3 /app/router.go
parent2dfeaae772e630ae361a35bf4680257d081560c1 (diff)
downloadskunky-art-c5514c3875b9b782688047d547dfd6663a5b77bb.tar.gz
skunky-art-c5514c3875b9b782688047d547dfd6663a5b77bb.tar.bz2
skunky-art-c5514c3875b9b782688047d547dfd6663a5b77bb.zip
v1.3
Diffstat (limited to 'app/router.go')
-rw-r--r--app/router.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/router.go b/app/router.go
index 33c3189..f87aa50 100644
--- a/app/router.go
+++ b/app/router.go
@@ -11,7 +11,7 @@ var Host string
func Router() {
parsepath := func(path string) map[int]string {
- if l := len(CFG.BasePath); len(path) > l {
+ if l := len(CFG.URI); len(path) > l {
path = path[l-1:]
} else {
path = "/"
@@ -54,7 +54,7 @@ func Router() {
var skunky skunkyart
skunky.Writer = w
skunky.Args = r.URL.Query()
- skunky.BasePath = CFG.BasePath
+ skunky.BasePath = CFG.URI
arg := skunky.Args.Get
skunky.QueryRaw = arg("q")
@@ -75,7 +75,7 @@ func Router() {
default:
skunky.ReturnHTTPError(404)
case "":
- skunky.ExecuteTemplate("index.htm", &CFG.BasePath)
+ skunky.ExecuteTemplate("index.htm", &CFG.URI)
case "post":
skunky.Deviation(path[2], path[3])
case "search":