diff options
Diffstat (limited to '')
| -rw-r--r-- | backend/controllers/homeController.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/backend/controllers/homeController.go b/backend/controllers/homeController.go index b5c6b60..2780e63 100644 --- a/backend/controllers/homeController.go +++ b/backend/controllers/homeController.go | |||
| @@ -23,12 +23,12 @@ func Home(c *gin.Context) { | |||
| 23 | 23 | ||
| 24 | // GET Rankings | 24 | // GET Rankings |
| 25 | // | 25 | // |
| 26 | // @Summary Get rankings of every player. | 26 | // @Description Get rankings of every player. |
| 27 | // @Tags rankings | 27 | // @Tags rankings |
| 28 | // @Produce json | 28 | // @Produce json |
| 29 | // @Success 200 {object} models.Response{data=models.RankingsResponse} | 29 | // @Success 200 {object} models.Response{data=models.RankingsResponse} |
| 30 | // @Failure 400 {object} models.Response | 30 | // @Failure 400 {object} models.Response |
| 31 | // @Router /demo [get] | 31 | // @Router /rankings [get] |
| 32 | func Rankings(c *gin.Context) { | 32 | func Rankings(c *gin.Context) { |
| 33 | rows, err := database.DB.Query(`SELECT steam_id, user_name FROM users`) | 33 | rows, err := database.DB.Query(`SELECT steam_id, user_name FROM users`) |
| 34 | if err != nil { | 34 | if err != nil { |
| @@ -125,13 +125,13 @@ func Rankings(c *gin.Context) { | |||
| 125 | 125 | ||
| 126 | // GET Search With Query | 126 | // GET Search With Query |
| 127 | // | 127 | // |
| 128 | // @Summary Get all user and map data matching to the query. | 128 | // @Description Get all user and map data matching to the query. |
| 129 | // @Tags search | 129 | // @Tags search |
| 130 | // @Produce json | 130 | // @Produce json |
| 131 | // @Param q query string false "Search user or map name." | 131 | // @Param q query string false "Search user or map name." |
| 132 | // @Success 200 {object} models.Response{data=models.SearchResponse} | 132 | // @Success 200 {object} models.Response{data=models.SearchResponse} |
| 133 | // @Failure 400 {object} models.Response | 133 | // @Failure 400 {object} models.Response |
| 134 | // @Router /search [get] | 134 | // @Router /search [get] |
| 135 | func SearchWithQuery(c *gin.Context) { | 135 | func SearchWithQuery(c *gin.Context) { |
| 136 | query := c.Query("q") | 136 | query := c.Query("q") |
| 137 | query = strings.ToLower(query) | 137 | query = strings.ToLower(query) |