{"action":"created","comment":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments/77453950","id":77453950,"diff_hunk":"@@ -574,11 +609,11 @@ api.deleteSocial = {\n   async handler (req, res) {\n     let user = res.locals.user;\n     let network = req.params.network;\n-\n-    if (network !== 'facebook') throw new NotAuthorized(res.t('onlyFbSupported'));\n-    if (!user.auth.local.username) throw new NotAuthorized(res.t('cantDetachFb'));\n-\n-    await User.update({_id: user._id}, {$unset: {'auth.facebook': 1}}).exec();\n+    if (supportedSocialNetworks.indexOf(network) === -1) throw new NotAuthorized(res.t('unsupportedNetwork'));\n+    if (!user.auth.local.username) throw new NotAuthorized(res.t('cantDetachSocial'));\n+    let unset = {};","path":"website/server/controllers/api-v3/auth.js","position":164,"original_position":164,"commit_id":"d441a7ff8b204d1f4987ff97ecd9d817e4ef2486","original_commit_id":"d441a7ff8b204d1f4987ff97ecd9d817e4ef2486","user":{"login":"crookedneighbor","id":2916945,"avatar_url":"https://avatars.githubusercontent.com/u/2916945?v=3","gravatar_id":"","url":"https://api.github.com/users/crookedneighbor","html_url":"https://github.com/crookedneighbor","followers_url":"https://api.github.com/users/crookedneighbor/followers","following_url":"https://api.github.com/users/crookedneighbor/following{/other_user}","gists_url":"https://api.github.com/users/crookedneighbor/gists{/gist_id}","starred_url":"https://api.github.com/users/crookedneighbor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crookedneighbor/subscriptions","organizations_url":"https://api.github.com/users/crookedneighbor/orgs","repos_url":"https://api.github.com/users/crookedneighbor/repos","events_url":"https://api.github.com/users/crookedneighbor/events{/privacy}","received_events_url":"https://api.github.com/users/crookedneighbor/received_events","type":"User","site_admin":false},"body":"```js\r\nlet unset = {\r\n  [`auth.${network}`]: 1,\r\n};\r\n```","created_at":"2016-09-04T15:02:23Z","updated_at":"2016-09-04T15:02:23Z","html_url":"https://github.com/HabitRPG/habitrpg/pull/7969#discussion_r77453950","pull_request_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969","_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments/77453950"},"html":{"href":"https://github.com/HabitRPG/habitrpg/pull/7969#discussion_r77453950"},"pull_request":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969"}}},"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969","id":83924014,"html_url":"https://github.com/HabitRPG/habitrpg/pull/7969","diff_url":"https://github.com/HabitRPG/habitrpg/pull/7969.diff","patch_url":"https://github.com/HabitRPG/habitrpg/pull/7969.patch","issue_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7969","number":7969,"state":"open","locked":false,"title":"Add Google Signin","user":{"login":"vIiRuS","id":298062,"avatar_url":"https://avatars.githubusercontent.com/u/298062?v=3","gravatar_id":"","url":"https://api.github.com/users/vIiRuS","html_url":"https://github.com/vIiRuS","followers_url":"https://api.github.com/users/vIiRuS/followers","following_url":"https://api.github.com/users/vIiRuS/following{/other_user}","gists_url":"https://api.github.com/users/vIiRuS/gists{/gist_id}","starred_url":"https://api.github.com/users/vIiRuS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vIiRuS/subscriptions","organizations_url":"https://api.github.com/users/vIiRuS/orgs","repos_url":"https://api.github.com/users/vIiRuS/repos","events_url":"https://api.github.com/users/vIiRuS/events{/privacy}","received_events_url":"https://api.github.com/users/vIiRuS/received_events","type":"User","site_admin":false},"body":"Adds Google Login and adds the option to add a social authentication method to existing accounts.","created_at":"2016-09-04T14:13:52Z","updated_at":"2016-09-04T15:02:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01afdba7ca5d902a8cfa6475b3d1327a4b7c13ff","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969/commits","review_comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969/comments","review_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7969/comments","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/d441a7ff8b204d1f4987ff97ecd9d817e4ef2486","head":{"label":"vIiRuS:googleAuth","ref":"googleAuth","sha":"d441a7ff8b204d1f4987ff97ecd9d817e4ef2486","user":{"login":"vIiRuS","id":298062,"avatar_url":"https://avatars.githubusercontent.com/u/298062?v=3","gravatar_id":"","url":"https://api.github.com/users/vIiRuS","html_url":"https://github.com/vIiRuS","followers_url":"https://api.github.com/users/vIiRuS/followers","following_url":"https://api.github.com/users/vIiRuS/following{/other_user}","gists_url":"https://api.github.com/users/vIiRuS/gists{/gist_id}","starred_url":"https://api.github.com/users/vIiRuS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vIiRuS/subscriptions","organizations_url":"https://api.github.com/users/vIiRuS/orgs","repos_url":"https://api.github.com/users/vIiRuS/repos","events_url":"https://api.github.com/users/vIiRuS/events{/privacy}","received_events_url":"https://api.github.com/users/vIiRuS/received_events","type":"User","site_admin":false},"repo":{"id":15554181,"name":"habitrpg","full_name":"vIiRuS/habitrpg","owner":{"login":"vIiRuS","id":298062,"avatar_url":"https://avatars.githubusercontent.com/u/298062?v=3","gravatar_id":"","url":"https://api.github.com/users/vIiRuS","html_url":"https://github.com/vIiRuS","followers_url":"https://api.github.com/users/vIiRuS/followers","following_url":"https://api.github.com/users/vIiRuS/following{/other_user}","gists_url":"https://api.github.com/users/vIiRuS/gists{/gist_id}","starred_url":"https://api.github.com/users/vIiRuS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vIiRuS/subscriptions","organizations_url":"https://api.github.com/users/vIiRuS/orgs","repos_url":"https://api.github.com/users/vIiRuS/repos","events_url":"https://api.github.com/users/vIiRuS/events{/privacy}","received_events_url":"https://api.github.com/users/vIiRuS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vIiRuS/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":true,"url":"https://api.github.com/repos/vIiRuS/habitrpg","forks_url":"https://api.github.com/repos/vIiRuS/habitrpg/forks","keys_url":"https://api.github.com/repos/vIiRuS/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vIiRuS/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vIiRuS/habitrpg/teams","hooks_url":"https://api.github.com/repos/vIiRuS/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/vIiRuS/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/vIiRuS/habitrpg/events","assignees_url":"https://api.github.com/repos/vIiRuS/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/vIiRuS/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/vIiRuS/habitrpg/tags","blobs_url":"https://api.github.com/repos/vIiRuS/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vIiRuS/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vIiRuS/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/vIiRuS/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vIiRuS/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/vIiRuS/habitrpg/languages","stargazers_url":"https://api.github.com/repos/vIiRuS/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/vIiRuS/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/vIiRuS/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/vIiRuS/habitrpg/subscription","commits_url":"https://api.github.com/repos/vIiRuS/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/vIiRuS/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/vIiRuS/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/vIiRuS/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/vIiRuS/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/vIiRuS/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vIiRuS/habitrpg/merges","archive_url":"https://api.github.com/repos/vIiRuS/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vIiRuS/habitrpg/downloads","issues_url":"https://api.github.com/repos/vIiRuS/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/vIiRuS/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/vIiRuS/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/vIiRuS/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vIiRuS/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/vIiRuS/habitrpg/releases{/id}","deployments_url":"https://api.github.com/repos/vIiRuS/habitrpg/deployments","created_at":"2013-12-31T17:43:20Z","updated_at":"2014-08-03T18:39:09Z","pushed_at":"2016-09-04T14:08:28Z","git_url":"git://github.com/vIiRuS/habitrpg.git","ssh_url":"git@github.com:vIiRuS/habitrpg.git","clone_url":"https://github.com/vIiRuS/habitrpg.git","svn_url":"https://github.com/vIiRuS/habitrpg","homepage":"habitrpg.com","size":425754,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HabitRPG:develop","ref":"develop","sha":"836cee25311ce0a3447085e4970cb676987a4499","user":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"repo":{"id":4578898,"name":"habitrpg","full_name":"HabitRPG/habitrpg","owner":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HabitRPG/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":false,"url":"https://api.github.com/repos/HabitRPG/habitrpg","forks_url":"https://api.github.com/repos/HabitRPG/habitrpg/forks","keys_url":"https://api.github.com/repos/HabitRPG/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HabitRPG/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HabitRPG/habitrpg/teams","hooks_url":"https://api.github.com/repos/HabitRPG/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/HabitRPG/habitrpg/events","assignees_url":"https://api.github.com/repos/HabitRPG/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/HabitRPG/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/tags","blobs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/HabitRPG/habitrpg/languages","stargazers_url":"https://api.github.com/repos/HabitRPG/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/HabitRPG/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/HabitRPG/habitrpg/subscription","commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/HabitRPG/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/HabitRPG/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/HabitRPG/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HabitRPG/habitrpg/merges","archive_url":"https://api.github.com/repos/HabitRPG/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HabitRPG/habitrpg/downloads","issues_url":"https://api.github.com/repos/HabitRPG/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/HabitRPG/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/HabitRPG/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/HabitRPG/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/HabitRPG/habitrpg/releases{/id}","deployments_url":"https://api.github.com/repos/HabitRPG/habitrpg/deployments","created_at":"2012-06-06T22:49:48Z","updated_at":"2016-09-04T14:43:37Z","pushed_at":"2016-09-04T14:13:52Z","git_url":"git://github.com/HabitRPG/habitrpg.git","ssh_url":"git@github.com:HabitRPG/habitrpg.git","clone_url":"https://github.com/HabitRPG/habitrpg.git","svn_url":"https://github.com/HabitRPG/habitrpg","homepage":"https://habitica.com","size":504738,"stargazers_count":4145,"watchers_count":4145,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1737,"mirror_url":null,"open_issues_count":375,"forks":1737,"open_issues":375,"watchers":4145,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969"},"html":{"href":"https://github.com/HabitRPG/habitrpg/pull/7969"},"issue":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7969"},"comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/issues/7969/comments"},"review_comments":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969/comments"},"review_comment":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/pulls/7969/commits"},"statuses":{"href":"https://api.github.com/repos/HabitRPG/habitrpg/statuses/d441a7ff8b204d1f4987ff97ecd9d817e4ef2486"}}}}
{"actor":{"display_login":"crookedneighbor"}}