1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Redirect to /page/view on /page/ request

This commit is contained in:
Zack Scholl 2017-05-24 10:42:37 -06:00
parent ceaef5a1ae
commit 68ecbdd595

View File

@ -59,7 +59,8 @@ func handlePageRequest(c *gin.Context) {
page := c.Param("page") page := c.Param("page")
command := c.Param("command") command := c.Param("command")
if len(command) < 2 { if len(command) < 2 {
command = "/ " c.Redirect(302, "/"+page+"/view")
return
} }
// Serve static content from memory // Serve static content from memory
if page == "static" { if page == "static" {