diff options
| -rw-r--r-- | backend/api/routes.go | 1 | ||||
| -rw-r--r-- | backend/handlers/home.go | 11 |
2 files changed, 0 insertions, 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) { | |||
| 17 | }) | 17 | }) |
| 18 | v1.GET("/token", handlers.GetCookie) | 18 | v1.GET("/token", handlers.GetCookie) |
| 19 | v1.DELETE("/token", handlers.DeleteCookie) | 19 | v1.DELETE("/token", handlers.DeleteCookie) |
| 20 | v1.GET("/home", CheckAuth, handlers.Home) | ||
| 21 | v1.GET("/login", handlers.Login) | 20 | v1.GET("/login", handlers.Login) |
| 22 | v1.GET("/profile", CheckAuth, handlers.Profile) | 21 | v1.GET("/profile", CheckAuth, handlers.Profile) |
| 23 | v1.PUT("/profile", CheckAuth, handlers.UpdateCountryCode) | 22 | 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 { | |||
| 22 | Multiplayer []models.UserRanking `json:"rankings_multiplayer"` | 22 | Multiplayer []models.UserRanking `json:"rankings_multiplayer"` |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | func Home(c *gin.Context) { | ||
| 26 | user, exists := c.Get("user") | ||
| 27 | if !exists { | ||
| 28 | c.JSON(200, "no id, not auth") | ||
| 29 | } else { | ||
| 30 | c.JSON(200, gin.H{ | ||
| 31 | "output": user, | ||
| 32 | }) | ||
| 33 | } | ||
| 34 | } | ||
| 35 | |||
| 36 | // GET Rankings | 25 | // GET Rankings |
| 37 | // | 26 | // |
| 38 | // @Description Get rankings of every player. | 27 | // @Description Get rankings of every player. |