fix: close body correctly

This commit is contained in:
Stavros
2025-04-30 19:55:03 +03:00
parent d171c5940b
commit 86a18b4cac
3 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ func GetGenericUser(client *http.Client, url string) (constants.Claims, error) {
return user, err
}
defer res.Body.Close()
log.Debug().Msg("Got response from generic provider")
// Read the body of the response

View File

@@ -39,6 +39,8 @@ func GetGithubUser(client *http.Client) (constants.Claims, error) {
return user, err
}
defer res.Body.Close()
log.Debug().Msg("Got user response from github")
// Read the body of the response
@@ -70,6 +72,8 @@ func GetGithubUser(client *http.Client) (constants.Claims, error) {
return user, err
}
defer res.Body.Close()
log.Debug().Msg("Got email response from github")
// Read the body of the response

View File

@@ -33,6 +33,8 @@ func GetGoogleUser(client *http.Client) (constants.Claims, error) {
return user, err
}
defer res.Body.Close()
log.Debug().Msg("Got response from google")
// Read the body of the response