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

Adding new route for viewing

Former-commit-id: cb10c6fcbd1aa6bf92d06cd2d8665887f5c2018b [formerly b5c933531b7b50a9cc39d462c975f280fd500518] [formerly 3fedbc58ecf2e91794c22e48d667e53d0083a164 [formerly bc44aafffac795fe1186dc61dd8eca229dbd0581 [formerly 2be7c500a7]]]
Former-commit-id: 9640ab56ba31f79aa603326ddf56aeee2bcbbfb0 [formerly 8a40c159a0eb7de236f7f4600e9678bef91d907c]
Former-commit-id: f27fb19a55aa7e7c88886c47136826d917c1aeb0
Former-commit-id: b94c81da30
This commit is contained in:
Zack Scholl 2016-02-06 21:58:32 -05:00
parent e5296b3892
commit d9fb844dc8

View File

@ -135,6 +135,15 @@ func main() {
} }
}) })
r.GET("/:title/*option", func(c *gin.Context) {
title := c.Param("title")
option := c.Param("option")
fmt.Println(title, "["+option+"]")
if option == "/view" {
} else {
c.Redirect(302, "/"+title)
}
})
r.Run(":12312") r.Run(":12312")
} }