{"action":"created","comment":{"url":"https://api.github.com/repos/RandoApp/Rando/pulls/comments/75888579","id":75888579,"diff_hunk":"@@ -33,56 +88,61 @@ module.exports = {\n     };\n \n     async.parallel({\n-      buildOut: function (parallelDone) {\n+      buildOut (parallelDone) {\n         async.each(user.out, function (rando, done) {\n           userJSON.out.push( self.buildRandoSync(rando) );\n           done();\n         }, parallelDone);\n       },\n-      buildIn: function (parallelDone) {\n+      buildIn (parallelDone) {\n         async.each(user.in, function (rando, done) {\n           userJSON.in.push( self.buildRandoSync(rando) );\n           done();\n         }, parallelDone);\n       }\n     }, function (err) {\n       if (err) {\n-        logger.warn(\"[userService.getUser, \", userId, \"] Error when each randos in parallel for : \", user);\n-        callback(Errors.System(err));\n-        return;\n+        logger.warn(\"[userService.getUser ] Error when each randos in parallel for : \", user);\n+        return callback(Errors.System(err));\n       }\n \n       backwardCompatibility.makeUserBackwardCompaitble(userJSON, function (err, compatibleUserJSON) {\n         if (err) {\n-          logger.warn(\"[userService.getUser, \", userId, \"] Error when make user backward compaitble\");\n-          callback(Errors.System(err));\n-          return;\n+          logger.warn(\"[userService.getUser] Error when make user backward compaitble\");\n+          return callback(Errors.System(err));\n+          \n         }\n         callback(null, compatibleUserJSON);\n       });\n     });\n   },\n-  findOrCreateByLoginAndPassword: function (email, password, ip, callback) {\n+\n+  findOrCreateByLoginAndPassword (email, password, ip, firebaseInstanceId, callback) {\n+    var self = this;\n     logger.debug(\"[userService.findOrCreateByLoginAndPassword, \", email, \"] Try find or create for user with email: \", email);\n \n     if (!email || !/.+@.+\\..+/.test(email) || !password) {\n       logger.warn(\"[userService.findOrCreateByLoginAndPassword, \", email, \"] Email or password is incorrect. Return error\");\n-      callback(Errors.LoginAndPasswordIncorrectArgs());\n-      return;\n+      return callback(Errors.LoginAndPasswordIncorrectArgs());","path":"src/service/userService.js","position":133,"original_position":133,"commit_id":"5504dde8187254523a3036f26bfd3d271d2bfc09","original_commit_id":"5504dde8187254523a3036f26bfd3d271d2bfc09","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [A function with a name starting with an uppercase letter should only be used as a constructor. (new-cap)](https://www.codacy.com/app/RandoApp/Rando/file/3510685346/issues/source?bid=3392764&fileBranchId=3459529#l126)","created_at":"2016-08-23T15:19:44Z","updated_at":"2016-08-23T15:19:44Z","html_url":"https://github.com/RandoApp/Rando/pull/41#discussion_r75888579","pull_request_url":"https://api.github.com/repos/RandoApp/Rando/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/comments/75888579"},"html":{"href":"https://github.com/RandoApp/Rando/pull/41#discussion_r75888579"},"pull_request":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/RandoApp/Rando/pulls/41","id":78341539,"html_url":"https://github.com/RandoApp/Rando/pull/41","diff_url":"https://github.com/RandoApp/Rando/pull/41.diff","patch_url":"https://github.com/RandoApp/Rando/pull/41.patch","issue_url":"https://api.github.com/repos/RandoApp/Rando/issues/41","number":41,"state":"open","locked":false,"title":"Update access to use token and store firebaseInstanceId","user":{"login":"xp-vit","id":2340581,"avatar_url":"https://avatars.githubusercontent.com/u/2340581?v=3","gravatar_id":"","url":"https://api.github.com/users/xp-vit","html_url":"https://github.com/xp-vit","followers_url":"https://api.github.com/users/xp-vit/followers","following_url":"https://api.github.com/users/xp-vit/following{/other_user}","gists_url":"https://api.github.com/users/xp-vit/gists{/gist_id}","starred_url":"https://api.github.com/users/xp-vit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xp-vit/subscriptions","organizations_url":"https://api.github.com/users/xp-vit/orgs","repos_url":"https://api.github.com/users/xp-vit/repos","events_url":"https://api.github.com/users/xp-vit/events{/privacy}","received_events_url":"https://api.github.com/users/xp-vit/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-21T15:54:03Z","updated_at":"2016-08-23T15:19:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7d8e35e180ded201a061f851c00927c26a543fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RandoApp/Rando/pulls/41/commits","review_comments_url":"https://api.github.com/repos/RandoApp/Rando/pulls/41/comments","review_comment_url":"https://api.github.com/repos/RandoApp/Rando/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RandoApp/Rando/issues/41/comments","statuses_url":"https://api.github.com/repos/RandoApp/Rando/statuses/5504dde8187254523a3036f26bfd3d271d2bfc09","head":{"label":"RandoApp:add-firebase-instance-id","ref":"add-firebase-instance-id","sha":"5504dde8187254523a3036f26bfd3d271d2bfc09","user":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"repo":{"id":12946779,"name":"Rando","full_name":"RandoApp/Rando","owner":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RandoApp/Rando","description":"Rando server. Give, receive and collect unique photos from random people from all over the world","fork":false,"url":"https://api.github.com/repos/RandoApp/Rando","forks_url":"https://api.github.com/repos/RandoApp/Rando/forks","keys_url":"https://api.github.com/repos/RandoApp/Rando/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RandoApp/Rando/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RandoApp/Rando/teams","hooks_url":"https://api.github.com/repos/RandoApp/Rando/hooks","issue_events_url":"https://api.github.com/repos/RandoApp/Rando/issues/events{/number}","events_url":"https://api.github.com/repos/RandoApp/Rando/events","assignees_url":"https://api.github.com/repos/RandoApp/Rando/assignees{/user}","branches_url":"https://api.github.com/repos/RandoApp/Rando/branches{/branch}","tags_url":"https://api.github.com/repos/RandoApp/Rando/tags","blobs_url":"https://api.github.com/repos/RandoApp/Rando/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RandoApp/Rando/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RandoApp/Rando/git/refs{/sha}","trees_url":"https://api.github.com/repos/RandoApp/Rando/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RandoApp/Rando/statuses/{sha}","languages_url":"https://api.github.com/repos/RandoApp/Rando/languages","stargazers_url":"https://api.github.com/repos/RandoApp/Rando/stargazers","contributors_url":"https://api.github.com/repos/RandoApp/Rando/contributors","subscribers_url":"https://api.github.com/repos/RandoApp/Rando/subscribers","subscription_url":"https://api.github.com/repos/RandoApp/Rando/subscription","commits_url":"https://api.github.com/repos/RandoApp/Rando/commits{/sha}","git_commits_url":"https://api.github.com/repos/RandoApp/Rando/git/commits{/sha}","comments_url":"https://api.github.com/repos/RandoApp/Rando/comments{/number}","issue_comment_url":"https://api.github.com/repos/RandoApp/Rando/issues/comments{/number}","contents_url":"https://api.github.com/repos/RandoApp/Rando/contents/{+path}","compare_url":"https://api.github.com/repos/RandoApp/Rando/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RandoApp/Rando/merges","archive_url":"https://api.github.com/repos/RandoApp/Rando/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RandoApp/Rando/downloads","issues_url":"https://api.github.com/repos/RandoApp/Rando/issues{/number}","pulls_url":"https://api.github.com/repos/RandoApp/Rando/pulls{/number}","milestones_url":"https://api.github.com/repos/RandoApp/Rando/milestones{/number}","notifications_url":"https://api.github.com/repos/RandoApp/Rando/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RandoApp/Rando/labels{/name}","releases_url":"https://api.github.com/repos/RandoApp/Rando/releases{/id}","deployments_url":"https://api.github.com/repos/RandoApp/Rando/deployments","created_at":"2013-09-19T11:18:46Z","updated_at":"2016-07-06T15:04:35Z","pushed_at":"2016-08-23T15:17:59Z","git_url":"git://github.com/RandoApp/Rando.git","ssh_url":"git@github.com:RandoApp/Rando.git","clone_url":"https://github.com/RandoApp/Rando.git","svn_url":"https://github.com/RandoApp/Rando","homepage":"https://rando4.me","size":2743,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":3,"default_branch":"master"}},"base":{"label":"RandoApp:master","ref":"master","sha":"9b4246c7d981df37a14ae9feef9c8b5b285a075f","user":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"repo":{"id":12946779,"name":"Rando","full_name":"RandoApp/Rando","owner":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RandoApp/Rando","description":"Rando server. Give, receive and collect unique photos from random people from all over the world","fork":false,"url":"https://api.github.com/repos/RandoApp/Rando","forks_url":"https://api.github.com/repos/RandoApp/Rando/forks","keys_url":"https://api.github.com/repos/RandoApp/Rando/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RandoApp/Rando/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RandoApp/Rando/teams","hooks_url":"https://api.github.com/repos/RandoApp/Rando/hooks","issue_events_url":"https://api.github.com/repos/RandoApp/Rando/issues/events{/number}","events_url":"https://api.github.com/repos/RandoApp/Rando/events","assignees_url":"https://api.github.com/repos/RandoApp/Rando/assignees{/user}","branches_url":"https://api.github.com/repos/RandoApp/Rando/branches{/branch}","tags_url":"https://api.github.com/repos/RandoApp/Rando/tags","blobs_url":"https://api.github.com/repos/RandoApp/Rando/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RandoApp/Rando/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RandoApp/Rando/git/refs{/sha}","trees_url":"https://api.github.com/repos/RandoApp/Rando/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RandoApp/Rando/statuses/{sha}","languages_url":"https://api.github.com/repos/RandoApp/Rando/languages","stargazers_url":"https://api.github.com/repos/RandoApp/Rando/stargazers","contributors_url":"https://api.github.com/repos/RandoApp/Rando/contributors","subscribers_url":"https://api.github.com/repos/RandoApp/Rando/subscribers","subscription_url":"https://api.github.com/repos/RandoApp/Rando/subscription","commits_url":"https://api.github.com/repos/RandoApp/Rando/commits{/sha}","git_commits_url":"https://api.github.com/repos/RandoApp/Rando/git/commits{/sha}","comments_url":"https://api.github.com/repos/RandoApp/Rando/comments{/number}","issue_comment_url":"https://api.github.com/repos/RandoApp/Rando/issues/comments{/number}","contents_url":"https://api.github.com/repos/RandoApp/Rando/contents/{+path}","compare_url":"https://api.github.com/repos/RandoApp/Rando/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RandoApp/Rando/merges","archive_url":"https://api.github.com/repos/RandoApp/Rando/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RandoApp/Rando/downloads","issues_url":"https://api.github.com/repos/RandoApp/Rando/issues{/number}","pulls_url":"https://api.github.com/repos/RandoApp/Rando/pulls{/number}","milestones_url":"https://api.github.com/repos/RandoApp/Rando/milestones{/number}","notifications_url":"https://api.github.com/repos/RandoApp/Rando/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RandoApp/Rando/labels{/name}","releases_url":"https://api.github.com/repos/RandoApp/Rando/releases{/id}","deployments_url":"https://api.github.com/repos/RandoApp/Rando/deployments","created_at":"2013-09-19T11:18:46Z","updated_at":"2016-07-06T15:04:35Z","pushed_at":"2016-08-23T15:17:59Z","git_url":"git://github.com/RandoApp/Rando.git","ssh_url":"git@github.com:RandoApp/Rando.git","clone_url":"https://github.com/RandoApp/Rando.git","svn_url":"https://github.com/RandoApp/Rando","homepage":"https://rando4.me","size":2743,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/41"},"html":{"href":"https://github.com/RandoApp/Rando/pull/41"},"issue":{"href":"https://api.github.com/repos/RandoApp/Rando/issues/41"},"comments":{"href":"https://api.github.com/repos/RandoApp/Rando/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RandoApp/Rando/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/RandoApp/Rando/statuses/5504dde8187254523a3036f26bfd3d271d2bfc09"}}}}
{"actor":{"display_login":"codacy-bot"}}