{"action":"created","comment":{"url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/comments/193491479","pull_request_review_id":126473894,"id":193491479,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzQ5MTQ3OQ==","diff_hunk":"@@ -1,21 +1,32 @@\n from flask.views import MethodView\n from flask import Blueprint, jsonify, request\n from app.models import User\n+from dbconnection import dbConnection\n \n auth = Blueprint(\"auth\", __name__)\n+db_connection = dbConnection()\n \n class RegisterUser(MethodView):\n     \"\"\" Route class to register a user \"\"\"\n     def post(self):\n         \"\"\" Register a user \"\"\"\n                 \n         post_data = request.get_json()\n+\n         username = post_data.get('username')\n         email = post_data.get('email')\n         password = post_data.get('password')\n         isAdmin = post_data.get('isAdmin')\n+\n+        if not username:","path":"app/auth/routes.py","position":21,"original_position":21,"commit_id":"8ef4655cdb991574d9e89a9db5a2bf98837fc369","original_commit_id":"1bafbbeddc179b11d6c9b069f58bbf79537553b5","user":{"login":"malmike","id":5392652,"node_id":"MDQ6VXNlcjUzOTI2NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/5392652?v=4","gravatar_id":"","url":"https://api.github.com/users/malmike","html_url":"https://github.com/malmike","followers_url":"https://api.github.com/users/malmike/followers","following_url":"https://api.github.com/users/malmike/following{/other_user}","gists_url":"https://api.github.com/users/malmike/gists{/gist_id}","starred_url":"https://api.github.com/users/malmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malmike/subscriptions","organizations_url":"https://api.github.com/users/malmike/orgs","repos_url":"https://api.github.com/users/malmike/repos","events_url":"https://api.github.com/users/malmike/events{/privacy}","received_events_url":"https://api.github.com/users/malmike/received_events","type":"User","site_admin":false},"body":"Do better validation. This is just testing for a condition where the specific data is not passed, but take a scenario where I pass an empty string or white space or symbols. You should take those and which ever other edge cases into consideration. Also, it would be better to create a utilises class that has all those validation methods and they are just called as opposed to each endpoint having to validate the data on it's own ","created_at":"2018-06-06T17:19:22Z","updated_at":"2018-06-06T17:21:44Z","html_url":"https://github.com/lytes20/bootcamp-challenge-3/pull/6#discussion_r193491479","pull_request_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/comments/193491479"},"html":{"href":"https://github.com/lytes20/bootcamp-challenge-3/pull/6#discussion_r193491479"},"pull_request":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6","id":193080028,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMDgwMDI4","html_url":"https://github.com/lytes20/bootcamp-challenge-3/pull/6","diff_url":"https://github.com/lytes20/bootcamp-challenge-3/pull/6.diff","patch_url":"https://github.com/lytes20/bootcamp-challenge-3/pull/6.patch","issue_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/6","number":6,"state":"open","locked":false,"title":"Set up database","user":{"login":"lytes20","id":25790450,"node_id":"MDQ6VXNlcjI1NzkwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/25790450?v=4","gravatar_id":"","url":"https://api.github.com/users/lytes20","html_url":"https://github.com/lytes20","followers_url":"https://api.github.com/users/lytes20/followers","following_url":"https://api.github.com/users/lytes20/following{/other_user}","gists_url":"https://api.github.com/users/lytes20/gists{/gist_id}","starred_url":"https://api.github.com/users/lytes20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytes20/subscriptions","organizations_url":"https://api.github.com/users/lytes20/orgs","repos_url":"https://api.github.com/users/lytes20/repos","events_url":"https://api.github.com/users/lytes20/events{/privacy}","received_events_url":"https://api.github.com/users/lytes20/received_events","type":"User","site_admin":false},"body":"## Set up database\r\nThis PR shows my database connection and i can store a new user to the database\r\n\r\n#### pivotal id\r\n#158068815","created_at":"2018-06-06T17:01:46Z","updated_at":"2018-06-06T17:21:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"306e94c392097bff67bded861cc0f8ba096c9ddf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6/commits","review_comments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6/comments","review_comment_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/6/comments","statuses_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/statuses/8ef4655cdb991574d9e89a9db5a2bf98837fc369","head":{"label":"lytes20:ch-database-setup","ref":"ch-database-setup","sha":"8ef4655cdb991574d9e89a9db5a2bf98837fc369","user":{"login":"lytes20","id":25790450,"node_id":"MDQ6VXNlcjI1NzkwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/25790450?v=4","gravatar_id":"","url":"https://api.github.com/users/lytes20","html_url":"https://github.com/lytes20","followers_url":"https://api.github.com/users/lytes20/followers","following_url":"https://api.github.com/users/lytes20/following{/other_user}","gists_url":"https://api.github.com/users/lytes20/gists{/gist_id}","starred_url":"https://api.github.com/users/lytes20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytes20/subscriptions","organizations_url":"https://api.github.com/users/lytes20/orgs","repos_url":"https://api.github.com/users/lytes20/repos","events_url":"https://api.github.com/users/lytes20/events{/privacy}","received_events_url":"https://api.github.com/users/lytes20/received_events","type":"User","site_admin":false},"repo":{"id":136123212,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYxMjMyMTI=","name":"bootcamp-challenge-3","full_name":"lytes20/bootcamp-challenge-3","owner":{"login":"lytes20","id":25790450,"node_id":"MDQ6VXNlcjI1NzkwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/25790450?v=4","gravatar_id":"","url":"https://api.github.com/users/lytes20","html_url":"https://github.com/lytes20","followers_url":"https://api.github.com/users/lytes20/followers","following_url":"https://api.github.com/users/lytes20/following{/other_user}","gists_url":"https://api.github.com/users/lytes20/gists{/gist_id}","starred_url":"https://api.github.com/users/lytes20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytes20/subscriptions","organizations_url":"https://api.github.com/users/lytes20/orgs","repos_url":"https://api.github.com/users/lytes20/repos","events_url":"https://api.github.com/users/lytes20/events{/privacy}","received_events_url":"https://api.github.com/users/lytes20/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lytes20/bootcamp-challenge-3","description":null,"fork":false,"url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3","forks_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/forks","keys_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/teams","hooks_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/hooks","issue_events_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/events{/number}","events_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/events","assignees_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/assignees{/user}","branches_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/branches{/branch}","tags_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/tags","blobs_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/statuses/{sha}","languages_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/languages","stargazers_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/stargazers","contributors_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/contributors","subscribers_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/subscribers","subscription_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/subscription","commits_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/contents/{+path}","compare_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/merges","archive_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/downloads","issues_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues{/number}","pulls_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls{/number}","milestones_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/milestones{/number}","notifications_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/labels{/name}","releases_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/releases{/id}","deployments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/deployments","created_at":"2018-06-05T05:12:50Z","updated_at":"2018-06-05T14:29:54Z","pushed_at":"2018-06-06T17:15:12Z","git_url":"git://github.com/lytes20/bootcamp-challenge-3.git","ssh_url":"git@github.com:lytes20/bootcamp-challenge-3.git","clone_url":"https://github.com/lytes20/bootcamp-challenge-3.git","svn_url":"https://github.com/lytes20/bootcamp-challenge-3","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lytes20:develop","ref":"develop","sha":"4f96a9f4a08e6a36ff82c27884fe7d65dbdbf0fa","user":{"login":"lytes20","id":25790450,"node_id":"MDQ6VXNlcjI1NzkwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/25790450?v=4","gravatar_id":"","url":"https://api.github.com/users/lytes20","html_url":"https://github.com/lytes20","followers_url":"https://api.github.com/users/lytes20/followers","following_url":"https://api.github.com/users/lytes20/following{/other_user}","gists_url":"https://api.github.com/users/lytes20/gists{/gist_id}","starred_url":"https://api.github.com/users/lytes20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytes20/subscriptions","organizations_url":"https://api.github.com/users/lytes20/orgs","repos_url":"https://api.github.com/users/lytes20/repos","events_url":"https://api.github.com/users/lytes20/events{/privacy}","received_events_url":"https://api.github.com/users/lytes20/received_events","type":"User","site_admin":false},"repo":{"id":136123212,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYxMjMyMTI=","name":"bootcamp-challenge-3","full_name":"lytes20/bootcamp-challenge-3","owner":{"login":"lytes20","id":25790450,"node_id":"MDQ6VXNlcjI1NzkwNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/25790450?v=4","gravatar_id":"","url":"https://api.github.com/users/lytes20","html_url":"https://github.com/lytes20","followers_url":"https://api.github.com/users/lytes20/followers","following_url":"https://api.github.com/users/lytes20/following{/other_user}","gists_url":"https://api.github.com/users/lytes20/gists{/gist_id}","starred_url":"https://api.github.com/users/lytes20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lytes20/subscriptions","organizations_url":"https://api.github.com/users/lytes20/orgs","repos_url":"https://api.github.com/users/lytes20/repos","events_url":"https://api.github.com/users/lytes20/events{/privacy}","received_events_url":"https://api.github.com/users/lytes20/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lytes20/bootcamp-challenge-3","description":null,"fork":false,"url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3","forks_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/forks","keys_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/teams","hooks_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/hooks","issue_events_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/events{/number}","events_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/events","assignees_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/assignees{/user}","branches_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/branches{/branch}","tags_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/tags","blobs_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/statuses/{sha}","languages_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/languages","stargazers_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/stargazers","contributors_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/contributors","subscribers_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/subscribers","subscription_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/subscription","commits_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/contents/{+path}","compare_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/merges","archive_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/downloads","issues_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues{/number}","pulls_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls{/number}","milestones_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/milestones{/number}","notifications_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/labels{/name}","releases_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/releases{/id}","deployments_url":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/deployments","created_at":"2018-06-05T05:12:50Z","updated_at":"2018-06-05T14:29:54Z","pushed_at":"2018-06-06T17:15:12Z","git_url":"git://github.com/lytes20/bootcamp-challenge-3.git","ssh_url":"git@github.com:lytes20/bootcamp-challenge-3.git","clone_url":"https://github.com/lytes20/bootcamp-challenge-3.git","svn_url":"https://github.com/lytes20/bootcamp-challenge-3","homepage":null,"size":29,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6"},"html":{"href":"https://github.com/lytes20/bootcamp-challenge-3/pull/6"},"issue":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/6"},"comments":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/lytes20/bootcamp-challenge-3/statuses/8ef4655cdb991574d9e89a9db5a2bf98837fc369"}},"author_association":"OWNER"}}
{"actor":{"display_login":"malmike"}}