{"action":"created","comment":{"url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/comments/149935501","pull_request_review_id":75406122,"id":149935501,"diff_hunk":"@@ -123,42 +123,27 @@ class User {\n   static resetPassword(req, res) {\n     const resetUrl = req.params.resetUrl;\n     const newPassword = req.body.password;\n-    if (resetUrl.length !== 12) {\n-      res.status(404).json({ message: 'This link is invalid' });\n+    if ((!newPassword) || (newPassword === '')) {\n+      res.status(400).json({ message: 'Please type in your new password' });\n+    } else if (newPassword.length < 6) {\n+      res.status(400).json({ message: 'Password should be 6 to 30 characters long' });\n     } else {\n-      userModel.findOne({ where: { passurl: resetUrl } })\n-        .then((foundUrl) => {\n-          if (foundUrl) {\n-            if ((!newPassword) || (newPassword === '')) {\n-              res.status(400).json({ message: 'Please type in your new password' });\n-            } else if (newPassword.length < 6) {\n-              res.status(400).json({ message: 'Password should be 6 to 30 characters long' });\n-            } else {\n-              userModel.update({ password: newPassword }, { where: { passurl: resetUrl },\n-                individualHooks: true },\n-              { fields: ['password'] })\n-                .then(() => {\n-                  userModel.update({ passurl: '' }, { where: { passurl: resetUrl } })\n-                    .then(() => {\n-                      res.status(201).json({ message: 'Your password has been updated' });\n-                    })\n-                    .catch((err) => {\n-                      res.status(500).json({ err });\n-                    });\n-                })\n-                .catch((error) => {\n-                  res.status(500).json({ error });\n-                });\n-            }\n-          } else {\n-            res.status(404).json({ message: 'This link is invalid' });\n-          }\n+      userModel.update({ password: newPassword }, { where: { passurl: resetUrl },\n+        individualHooks: true },\n+      { fields: ['password'] })","path":"server/controller/user.js","position":40,"original_position":40,"commit_id":"8bddbf2b62f4d00e0c6182d6e7f1bb5df296d100","original_commit_id":"8bddbf2b62f4d00e0c6182d6e7f1bb5df296d100","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Expected a newline before ')'                            function-paren-newline","created_at":"2017-11-09T11:25:13Z","updated_at":"2017-11-09T11:25:14Z","html_url":"https://github.com/BalogunDell/HelloBooks/pull/95#discussion_r149935501","pull_request_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/comments/149935501"},"html":{"href":"https://github.com/BalogunDell/HelloBooks/pull/95#discussion_r149935501"},"pull_request":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95","id":151626028,"html_url":"https://github.com/BalogunDell/HelloBooks/pull/95","diff_url":"https://github.com/BalogunDell/HelloBooks/pull/95.diff","patch_url":"https://github.com/BalogunDell/HelloBooks/pull/95.patch","issue_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/95","number":95,"state":"open","locked":false,"title":"feature(reset-password): refactor user password api and make api call…","user":{"login":"BalogunDell","id":24609423,"avatar_url":"https://avatars1.githubusercontent.com/u/24609423?v=4","gravatar_id":"","url":"https://api.github.com/users/BalogunDell","html_url":"https://github.com/BalogunDell","followers_url":"https://api.github.com/users/BalogunDell/followers","following_url":"https://api.github.com/users/BalogunDell/following{/other_user}","gists_url":"https://api.github.com/users/BalogunDell/gists{/gist_id}","starred_url":"https://api.github.com/users/BalogunDell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalogunDell/subscriptions","organizations_url":"https://api.github.com/users/BalogunDell/orgs","repos_url":"https://api.github.com/users/BalogunDell/repos","events_url":"https://api.github.com/users/BalogunDell/events{/privacy}","received_events_url":"https://api.github.com/users/BalogunDell/received_events","type":"User","site_admin":false},"body":"…[Finishes #152179073]","created_at":"2017-11-09T11:25:03Z","updated_at":"2017-11-09T11:25:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95/commits","review_comments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95/comments","review_comment_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/95/comments","statuses_url":"https://api.github.com/repos/BalogunDell/HelloBooks/statuses/8bddbf2b62f4d00e0c6182d6e7f1bb5df296d100","head":{"label":"BalogunDell:feature/152179073/reset-password","ref":"feature/152179073/reset-password","sha":"8bddbf2b62f4d00e0c6182d6e7f1bb5df296d100","user":{"login":"BalogunDell","id":24609423,"avatar_url":"https://avatars1.githubusercontent.com/u/24609423?v=4","gravatar_id":"","url":"https://api.github.com/users/BalogunDell","html_url":"https://github.com/BalogunDell","followers_url":"https://api.github.com/users/BalogunDell/followers","following_url":"https://api.github.com/users/BalogunDell/following{/other_user}","gists_url":"https://api.github.com/users/BalogunDell/gists{/gist_id}","starred_url":"https://api.github.com/users/BalogunDell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalogunDell/subscriptions","organizations_url":"https://api.github.com/users/BalogunDell/orgs","repos_url":"https://api.github.com/users/BalogunDell/repos","events_url":"https://api.github.com/users/BalogunDell/events{/privacy}","received_events_url":"https://api.github.com/users/BalogunDell/received_events","type":"User","site_admin":false},"repo":{"id":98496358,"name":"HelloBooks","full_name":"BalogunDell/HelloBooks","owner":{"login":"BalogunDell","id":24609423,"avatar_url":"https://avatars1.githubusercontent.com/u/24609423?v=4","gravatar_id":"","url":"https://api.github.com/users/BalogunDell","html_url":"https://github.com/BalogunDell","followers_url":"https://api.github.com/users/BalogunDell/followers","following_url":"https://api.github.com/users/BalogunDell/following{/other_user}","gists_url":"https://api.github.com/users/BalogunDell/gists{/gist_id}","starred_url":"https://api.github.com/users/BalogunDell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalogunDell/subscriptions","organizations_url":"https://api.github.com/users/BalogunDell/orgs","repos_url":"https://api.github.com/users/BalogunDell/repos","events_url":"https://api.github.com/users/BalogunDell/events{/privacy}","received_events_url":"https://api.github.com/users/BalogunDell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BalogunDell/HelloBooks","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books.","fork":false,"url":"https://api.github.com/repos/BalogunDell/HelloBooks","forks_url":"https://api.github.com/repos/BalogunDell/HelloBooks/forks","keys_url":"https://api.github.com/repos/BalogunDell/HelloBooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BalogunDell/HelloBooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BalogunDell/HelloBooks/teams","hooks_url":"https://api.github.com/repos/BalogunDell/HelloBooks/hooks","issue_events_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/events{/number}","events_url":"https://api.github.com/repos/BalogunDell/HelloBooks/events","assignees_url":"https://api.github.com/repos/BalogunDell/HelloBooks/assignees{/user}","branches_url":"https://api.github.com/repos/BalogunDell/HelloBooks/branches{/branch}","tags_url":"https://api.github.com/repos/BalogunDell/HelloBooks/tags","blobs_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BalogunDell/HelloBooks/statuses/{sha}","languages_url":"https://api.github.com/repos/BalogunDell/HelloBooks/languages","stargazers_url":"https://api.github.com/repos/BalogunDell/HelloBooks/stargazers","contributors_url":"https://api.github.com/repos/BalogunDell/HelloBooks/contributors","subscribers_url":"https://api.github.com/repos/BalogunDell/HelloBooks/subscribers","subscription_url":"https://api.github.com/repos/BalogunDell/HelloBooks/subscription","commits_url":"https://api.github.com/repos/BalogunDell/HelloBooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/BalogunDell/HelloBooks/contents/{+path}","compare_url":"https://api.github.com/repos/BalogunDell/HelloBooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BalogunDell/HelloBooks/merges","archive_url":"https://api.github.com/repos/BalogunDell/HelloBooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BalogunDell/HelloBooks/downloads","issues_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues{/number}","pulls_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls{/number}","milestones_url":"https://api.github.com/repos/BalogunDell/HelloBooks/milestones{/number}","notifications_url":"https://api.github.com/repos/BalogunDell/HelloBooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BalogunDell/HelloBooks/labels{/name}","releases_url":"https://api.github.com/repos/BalogunDell/HelloBooks/releases{/id}","deployments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/deployments","created_at":"2017-07-27T05:13:49Z","updated_at":"2017-08-27T16:17:51Z","pushed_at":"2017-11-09T11:25:04Z","git_url":"git://github.com/BalogunDell/HelloBooks.git","ssh_url":"git@github.com:BalogunDell/HelloBooks.git","clone_url":"https://github.com/BalogunDell/HelloBooks.git","svn_url":"https://github.com/BalogunDell/HelloBooks","homepage":"","size":11785,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"BalogunDell:develop","ref":"develop","sha":"6522b54fb7295caa32089a741d949868056c383e","user":{"login":"BalogunDell","id":24609423,"avatar_url":"https://avatars1.githubusercontent.com/u/24609423?v=4","gravatar_id":"","url":"https://api.github.com/users/BalogunDell","html_url":"https://github.com/BalogunDell","followers_url":"https://api.github.com/users/BalogunDell/followers","following_url":"https://api.github.com/users/BalogunDell/following{/other_user}","gists_url":"https://api.github.com/users/BalogunDell/gists{/gist_id}","starred_url":"https://api.github.com/users/BalogunDell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalogunDell/subscriptions","organizations_url":"https://api.github.com/users/BalogunDell/orgs","repos_url":"https://api.github.com/users/BalogunDell/repos","events_url":"https://api.github.com/users/BalogunDell/events{/privacy}","received_events_url":"https://api.github.com/users/BalogunDell/received_events","type":"User","site_admin":false},"repo":{"id":98496358,"name":"HelloBooks","full_name":"BalogunDell/HelloBooks","owner":{"login":"BalogunDell","id":24609423,"avatar_url":"https://avatars1.githubusercontent.com/u/24609423?v=4","gravatar_id":"","url":"https://api.github.com/users/BalogunDell","html_url":"https://github.com/BalogunDell","followers_url":"https://api.github.com/users/BalogunDell/followers","following_url":"https://api.github.com/users/BalogunDell/following{/other_user}","gists_url":"https://api.github.com/users/BalogunDell/gists{/gist_id}","starred_url":"https://api.github.com/users/BalogunDell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BalogunDell/subscriptions","organizations_url":"https://api.github.com/users/BalogunDell/orgs","repos_url":"https://api.github.com/users/BalogunDell/repos","events_url":"https://api.github.com/users/BalogunDell/events{/privacy}","received_events_url":"https://api.github.com/users/BalogunDell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BalogunDell/HelloBooks","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books.","fork":false,"url":"https://api.github.com/repos/BalogunDell/HelloBooks","forks_url":"https://api.github.com/repos/BalogunDell/HelloBooks/forks","keys_url":"https://api.github.com/repos/BalogunDell/HelloBooks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BalogunDell/HelloBooks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BalogunDell/HelloBooks/teams","hooks_url":"https://api.github.com/repos/BalogunDell/HelloBooks/hooks","issue_events_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/events{/number}","events_url":"https://api.github.com/repos/BalogunDell/HelloBooks/events","assignees_url":"https://api.github.com/repos/BalogunDell/HelloBooks/assignees{/user}","branches_url":"https://api.github.com/repos/BalogunDell/HelloBooks/branches{/branch}","tags_url":"https://api.github.com/repos/BalogunDell/HelloBooks/tags","blobs_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/refs{/sha}","trees_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BalogunDell/HelloBooks/statuses/{sha}","languages_url":"https://api.github.com/repos/BalogunDell/HelloBooks/languages","stargazers_url":"https://api.github.com/repos/BalogunDell/HelloBooks/stargazers","contributors_url":"https://api.github.com/repos/BalogunDell/HelloBooks/contributors","subscribers_url":"https://api.github.com/repos/BalogunDell/HelloBooks/subscribers","subscription_url":"https://api.github.com/repos/BalogunDell/HelloBooks/subscription","commits_url":"https://api.github.com/repos/BalogunDell/HelloBooks/commits{/sha}","git_commits_url":"https://api.github.com/repos/BalogunDell/HelloBooks/git/commits{/sha}","comments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/comments{/number}","issue_comment_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/comments{/number}","contents_url":"https://api.github.com/repos/BalogunDell/HelloBooks/contents/{+path}","compare_url":"https://api.github.com/repos/BalogunDell/HelloBooks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BalogunDell/HelloBooks/merges","archive_url":"https://api.github.com/repos/BalogunDell/HelloBooks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BalogunDell/HelloBooks/downloads","issues_url":"https://api.github.com/repos/BalogunDell/HelloBooks/issues{/number}","pulls_url":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls{/number}","milestones_url":"https://api.github.com/repos/BalogunDell/HelloBooks/milestones{/number}","notifications_url":"https://api.github.com/repos/BalogunDell/HelloBooks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BalogunDell/HelloBooks/labels{/name}","releases_url":"https://api.github.com/repos/BalogunDell/HelloBooks/releases{/id}","deployments_url":"https://api.github.com/repos/BalogunDell/HelloBooks/deployments","created_at":"2017-07-27T05:13:49Z","updated_at":"2017-08-27T16:17:51Z","pushed_at":"2017-11-09T11:25:04Z","git_url":"git://github.com/BalogunDell/HelloBooks.git","ssh_url":"git@github.com:BalogunDell/HelloBooks.git","clone_url":"https://github.com/BalogunDell/HelloBooks.git","svn_url":"https://github.com/BalogunDell/HelloBooks","homepage":"","size":11785,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95"},"html":{"href":"https://github.com/BalogunDell/HelloBooks/pull/95"},"issue":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/95"},"comments":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/BalogunDell/HelloBooks/statuses/8bddbf2b62f4d00e0c6182d6e7f1bb5df296d100"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}