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) {
|
||||
defer response.Body.Close()
|
||||
user := &database.User{
|
||||
CreatedAt: time.Now(),
|
||||
}
|
||||
|
||||
err := json.NewDecoder(response.Body).Decode(user)
|
||||
defer response.Body.Close()
|
||||
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue