mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
fix: close body correctly
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user