diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-19 14:14:11 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-04-19 14:14:11 +0300 |
| commit | 9fade13368c732401030d392ef2332279716243e (patch) | |
| tree | 17427c8ec058ee8c32d0244230031fb4f6f50767 /backend/controllers/loginController.go | |
| parent | doc: swagger init for login and user routes (#34) (diff) | |
| download | lphub-9fade13368c732401030d392ef2332279716243e.tar.gz lphub-9fade13368c732401030d392ef2332279716243e.tar.bz2 lphub-9fade13368c732401030d392ef2332279716243e.zip | |
doc: complete rest of swagger implementation, change rankings response (#34)
Diffstat (limited to 'backend/controllers/loginController.go')
| -rw-r--r-- | backend/controllers/loginController.go | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/backend/controllers/loginController.go b/backend/controllers/loginController.go index 6feda8a..84ef22f 100644 --- a/backend/controllers/loginController.go +++ b/backend/controllers/loginController.go | |||
| @@ -40,7 +40,6 @@ func Login(c *gin.Context) { | |||
| 40 | var checkSteamID int64 | 40 | var checkSteamID int64 |
| 41 | err = database.DB.QueryRow("SELECT steam_id FROM users WHERE steam_id = $1", steamID).Scan(&checkSteamID) | 41 | err = database.DB.QueryRow("SELECT steam_id FROM users WHERE steam_id = $1", steamID).Scan(&checkSteamID) |
| 42 | // if err != nil { | 42 | // if err != nil { |
| 43 | // fmt.Println("y1") | ||
| 44 | // c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) | 43 | // c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) |
| 45 | // return | 44 | // return |
| 46 | // } | 45 | // } |
| @@ -48,7 +47,6 @@ func Login(c *gin.Context) { | |||
| 48 | if checkSteamID == 0 { | 47 | if checkSteamID == 0 { |
| 49 | user, err := GetPlayerSummaries(steamID, os.Getenv("API_KEY")) | 48 | user, err := GetPlayerSummaries(steamID, os.Getenv("API_KEY")) |
| 50 | if err != nil { | 49 | if err != nil { |
| 51 | fmt.Println("y2") | ||
| 52 | c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) | 50 | c.JSON(http.StatusBadRequest, models.ErrorResponse(err.Error())) |
| 53 | return | 51 | return |
| 54 | } | 52 | } |