aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-02 21:40:39 +0300
committerArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2023-09-02 21:40:39 +0300
commitbb5ec62a0da2cd689bc5c2d65f639ae90f4cc3b4 (patch)
treeba71a825779411b998da039bf9918741fd9e2a05 /backend
parentfix: imrpoved user models on responses (diff)
downloadlphub-bb5ec62a0da2cd689bc5c2d65f639ae90f4cc3b4.tar.gz
lphub-bb5ec62a0da2cd689bc5c2d65f639ae90f4cc3b4.tar.bz2
lphub-bb5ec62a0da2cd689bc5c2d65f639ae90f4cc3b4.zip
fix: remove redundant home route
Former-commit-id: fbc6789b2ca54aeb13d8bc6e8ec406e524e00606
Diffstat (limited to 'backend')
-rw-r--r--backend/api/routes.go1
-rw-r--r--backend/handlers/home.go11
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
25func 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.