From bb5ec62a0da2cd689bc5c2d65f639ae90f4cc3b4 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Sat, 2 Sep 2023 21:40:39 +0300 Subject: fix: remove redundant home route Former-commit-id: fbc6789b2ca54aeb13d8bc6e8ec406e524e00606 --- backend/api/routes.go | 1 - backend/handlers/home.go | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/backend/api/routes.go b/backend/api/routes.go index ac622d4..fd3b8cc 100644 --- a/backend/api/routes.go +++ b/backend/api/routes.go @@ -17,7 +17,6 @@ func InitRoutes(router *gin.Engine) { }) v1.GET("/token", handlers.GetCookie) v1.DELETE("/token", handlers.DeleteCookie) - v1.GET("/home", CheckAuth, handlers.Home) v1.GET("/login", handlers.Login) v1.GET("/profile", CheckAuth, handlers.Profile) v1.PUT("/profile", CheckAuth, handlers.UpdateCountryCode) diff --git a/backend/handlers/home.go b/backend/handlers/home.go index eb3912c..2095a74 100644 --- a/backend/handlers/home.go +++ b/backend/handlers/home.go @@ -22,17 +22,6 @@ type RankingsResponse struct { Multiplayer []models.UserRanking `json:"rankings_multiplayer"` } -func Home(c *gin.Context) { - user, exists := c.Get("user") - if !exists { - c.JSON(200, "no id, not auth") - } else { - c.JSON(200, gin.H{ - "output": user, - }) - } -} - // GET Rankings // // @Description Get rankings of every player. -- cgit v1.2.3