From d49f231f83a4bd40decd52997d6e797bfef4f635 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 29 Jun 2016 19:55:59 -0400 Subject: [PATCH] Added /v /l to Fix #51 Former-commit-id: 32996f7efeb1924839ec83de15e72880a3a4c4da [formerly 73b08b487ebd036d83a97d62102b4fa043084dc1] [formerly 39ce9753f80d3aa08ef9e9db20d2455364b647ef [formerly 705cdf8b87d3ab37bbcbfa04763289022a21f91e]] Former-commit-id: e2e0c4a0ebc2d817525f3a3e29147bf97e62bb14 [formerly 79e05aae99bab06a9b2f76dd8252cfced37a8242] Former-commit-id: 50d9800b33eab7df7c74449952ebdaee8860b57c --- routes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes.go b/routes.go index d0b86dc..dde8a32 100644 --- a/routes.go +++ b/routes.go @@ -308,7 +308,7 @@ func editNote(c *gin.Context) { func everythingElse(c *gin.Context) { option := c.Param("option") title := c.Param("title") - if option == "/view" { + if option == "/view" || option == "/v" { version := c.DefaultQuery("version", "-1") noprompt := c.DefaultQuery("noprompt", "-1") versionNum, _ := strconv.Atoi(version) @@ -340,7 +340,7 @@ func everythingElse(c *gin.Context) { c.Data(200, contentType(title), []byte(currentText)) } else if title == "ls" && option == "/"+RuntimeArgs.AdminKey && len(RuntimeArgs.AdminKey) > 1 { renderMarkdown(c, listEverything(), "ls", nil, RuntimeArgs.AdminKey, time.Now().Sub(time.Now()), false, false, false, []string{}) - } else if option == "/list" { + } else if option == "/list" || option == "/l" { renderList(c, title) } else if title == "static" { serveStaticFile(c, option)