testing | dont be recursive for external domains | finalize oauth #5
|
@ -259,11 +259,13 @@ func getOauthUser(dbConn *sql.DB, client *http.Client, uri string) (*database.Us
|
||||||
}
|
}
|
||||||
|
|
||||||
func createUserFromResponse(response *http.Response) (*database.User, error) {
|
func createUserFromResponse(response *http.Response) (*database.User, error) {
|
||||||
defer response.Body.Close()
|
|
||||||
user := &database.User{
|
user := &database.User{
|
||||||
CreatedAt: time.Now(),
|
CreatedAt: time.Now(),
|
||||||
}
|
}
|
||||||
|
|
||||||
err := json.NewDecoder(response.Body).Decode(user)
|
err := json.NewDecoder(response.Body).Decode(user)
|
||||||
|
defer response.Body.Close()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue