fix: redirect shortened 'a' URLs (#65)

This commit is contained in:
Bnyro 2023-09-28 19:26:34 +02:00 committed by GitHub
parent dcf0805334
commit cf89be2a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ func main() {
r.POST("/", routes.PostHome) r.POST("/", routes.PostHome)
r.GET("/a/:id", routes.RedirectShortenedOverflowURL) r.GET("/a/:id", routes.RedirectShortenedOverflowURL)
r.GET("/q/:id", routes.RedirectShortenedOverflowURL)
r.GET("/questions/:id", func(c *gin.Context) { r.GET("/questions/:id", func(c *gin.Context) {
// redirect user to the question with the title // redirect user to the question with the title