From 3c3341fb658cddaae8d29473cee89ebc21c63323 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Wed, 7 Jun 2023 12:25:52 -0400 Subject: [PATCH] Remove all the 301 errors --- routes/api/badges/badges.go | 2 +- routes/api/discover/discover.go | 2 +- routes/root/root.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/api/badges/badges.go b/routes/api/badges/badges.go index 4c23016..1eb9e1b 100644 --- a/routes/api/badges/badges.go +++ b/routes/api/badges/badges.go @@ -10,7 +10,7 @@ import ( func Routes(route *gin.Engine) { auth := route.Group("/api/badges") - auth.GET("/", func(context *gin.Context) { + auth.GET("", func(context *gin.Context) { query := context.Query("streamerName") if query != "" { data, err := twitch.GetStreamerBadges(query) diff --git a/routes/api/discover/discover.go b/routes/api/discover/discover.go index 9df1e86..3b4c66f 100644 --- a/routes/api/discover/discover.go +++ b/routes/api/discover/discover.go @@ -10,7 +10,7 @@ import ( func Routes(route *gin.Engine) { auth := route.Group("/api/discover") - auth.GET("/", func(context *gin.Context) { + auth.GET("", func(context *gin.Context) { data, err := twitch.GetDiscoveryPage(50, "") if err != nil { context.Error(err) diff --git a/routes/root/root.go b/routes/root/root.go index 783087d..b257da8 100644 --- a/routes/root/root.go +++ b/routes/root/root.go @@ -10,7 +10,7 @@ import ( func Routes(route *gin.Engine) { auth := route.Group("/") - auth.GET("/", func(context *gin.Context) { + auth.GET("", func(context *gin.Context) { upgradeHeader := context.Request.Header.Get("Upgrade") if upgradeHeader == "websocket" { chat.ServeWS(context)