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

Need to handle /page/ and /page the same

Fixes #88
This commit is contained in:
Zack Scholl 2017-11-04 12:49:02 -06:00
parent 840fbf73ec
commit 4a916984e6

View File

@ -36,7 +36,7 @@ func serve(host, port, crt_path, key_path string, TLS bool, cssFile string, defa
})
router.GET("/:page", func(c *gin.Context) {
page := c.Param("page")
c.Redirect(302, "/"+page+"/edit")
c.Redirect(302, "/"+page+"/")
})
router.GET("/:page/*command", handlePageRequest)
router.POST("/update", handlePageUpdate)