Forget about postgres for now, depend on On duplicate key update
This commit is contained in:
parent
a8104da482
commit
4d786d687c
1 changed files with 0 additions and 1 deletions
|
|
@ -42,7 +42,6 @@ class Services::Facebook < Service
|
|||
url = "https://graph.facebook.com/me/friends?fields[]=name&fields[]=picture&access_token=#{URI.escape(self.access_token)}"
|
||||
response = Faraday.get(url)
|
||||
data = JSON.parse(response.body)['data']
|
||||
ServiceUser.where(:service_id => self.id).delete_all
|
||||
s_users = data.map{ |p|
|
||||
ServiceUser.new(:service_id => self.id, :uid => p["id"], :photo_url => p["picture"], :name => p["name"])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue