summaryrefslogtreecommitdiff
path: root/src/short.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/short.nim')
-rw-r--r--src/short.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/short.nim b/src/short.nim
index df26552..fa5486a 100644
--- a/src/short.nim
+++ b/src/short.nim
@@ -24,6 +24,9 @@ func renderIndex(): string {.raises: [].} =
var req: ShortUrl
compileTemplateFile(getScriptDir() / "templates/index.html")
+func renderAbout(): string {.raises: [].} =
+ compileTemplateFile(getScriptDir() / "templates/about.html")
+
func renderShort(req: ShortUrl): string {.raises: [].} =
compileTemplateFile(getScriptDir() / "templates/short.html")
@@ -96,6 +99,8 @@ proc handleIndexPost(params: Table[string, string]): (HttpCode, string) {.raises
routes:
get "/":
resp renderIndex()
+ get "/about":
+ resp renderAbout()
post "/":
initDB()
var (code, content) = handleIndexPost(request.params)