diff options
| author | lost+skunk <[email protected]> | 2024-09-02 11:16:54 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-09-02 11:16:54 +0300 |
| commit | 14645842643c4e5fa542def715ac1629e182388c (patch) | |
| tree | 80da1c9b891ce8b4f2393311f36f4530176366af /app/router.go | |
| parent | 2f8c35ba322e3c8c6e0bff8f7818d4eedf002928 (diff) | |
| download | skunky-art-14645842643c4e5fa542def715ac1629e182388c.tar.gz skunky-art-14645842643c4e5fa542def715ac1629e182388c.tar.bz2 skunky-art-14645842643c4e5fa542def715ac1629e182388c.zip | |
instance list update
Diffstat (limited to 'app/router.go')
| -rw-r--r-- | app/router.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/router.go b/app/router.go index 35550f8..2bcaf41 100644 --- a/app/router.go +++ b/app/router.go @@ -83,13 +83,15 @@ func Router() { } skunky.Endpoint = path[1] + skunky.API.skunkyartLink = &skunky // пути switch skunky.Endpoint { default: skunky.ReturnHTTPError(404) + case "": - w.Write(open("html/index.htm")) + skunky.ExecuteTemplate("index.htm", "html", &CFG.URI) case "post": skunky.Deviation(path[2], path[3]) case "search": @@ -120,6 +122,12 @@ func Router() { w.Write(open("css/skunky.css")) case "favicon.ico": w.Write(open("images/logo.png")) + + case "api": + switch path[2] { + case "random": + skunky.API.Random() + } } } |
