mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Added /v /l to Fix #51
Former-commit-id: 32996f7efeb1924839ec83de15e72880a3a4c4da [formerly 73b08b487ebd036d83a97d62102b4fa043084dc1] [formerly 39ce9753f80d3aa08ef9e9db20d2455364b647ef [formerly 4806dad9888611d42d69f130386471b9d5a0688b [formerly705cdf8b87
]]] Former-commit-id: e2e0c4a0ebc2d817525f3a3e29147bf97e62bb14 [formerly 79e05aae99bab06a9b2f76dd8252cfced37a8242] Former-commit-id: 50d9800b33eab7df7c74449952ebdaee8860b57c Former-commit-id:d49f231f83
This commit is contained in:
parent
1ee8269267
commit
f89c71f013
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user