{"action":"created","comment":{"url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/comments/84935671","pull_request_review_id":5681402,"id":84935671,"diff_hunk":"@@ -0,0 +1,90 @@\n+'use strict';\n+\n+var bodyParser = require('body-parser');\n+var session = require('express-session');\n+var bcrypt = require('bcrypt');\n+var db = require('../database.js');\n+var config = require('../config.js');\n+var MySQLStore = require('express-mysql-session')(session);\n+var sessionStore = new MySQLStore(config.dbOptions);\n+\n+function requireAuthentication(req, res, next) {\n+\n+\tif (!req.isAuthenticated()) {\n+\t\treturn res.redirect('/login');\n+\t}\n+\n+\t// The user is logged in.F\n+\t// Allow heir request to continue.\n+\tnext();\n+}\n+\n+\n+module.exports = function(app) {\n+\n+\tapp.get('/profile', function(req, res, next) {","path":"controllers/profile.js","position":25,"original_position":25,"commit_id":"674e144b523d5bac18379f6ddb9ab057932af130","original_commit_id":"674e144b523d5bac18379f6ddb9ab057932af130","user":{"login":"chill117","id":1775417,"avatar_url":"https://avatars.githubusercontent.com/u/1775417?v=3","gravatar_id":"","url":"https://api.github.com/users/chill117","html_url":"https://github.com/chill117","followers_url":"https://api.github.com/users/chill117/followers","following_url":"https://api.github.com/users/chill117/following{/other_user}","gists_url":"https://api.github.com/users/chill117/gists{/gist_id}","starred_url":"https://api.github.com/users/chill117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chill117/subscriptions","organizations_url":"https://api.github.com/users/chill117/orgs","repos_url":"https://api.github.com/users/chill117/repos","events_url":"https://api.github.com/users/chill117/events{/privacy}","received_events_url":"https://api.github.com/users/chill117/received_events","type":"User","site_admin":false},"body":"This route should be protected by the `requireAuthentication` middleware from above, I think.","created_at":"2016-10-25T15:50:19Z","updated_at":"2016-10-25T15:54:38Z","html_url":"https://github.com/Learn-by-doing/bitstarter/pull/36#discussion_r84935671","pull_request_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/comments/84935671"},"html":{"href":"https://github.com/Learn-by-doing/bitstarter/pull/36#discussion_r84935671"},"pull_request":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36","id":89535448,"html_url":"https://github.com/Learn-by-doing/bitstarter/pull/36","diff_url":"https://github.com/Learn-by-doing/bitstarter/pull/36.diff","patch_url":"https://github.com/Learn-by-doing/bitstarter/pull/36.patch","issue_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/36","number":36,"state":"open","locked":false,"title":"Profile update","user":{"login":"ipovalyaev","id":6887042,"avatar_url":"https://avatars.githubusercontent.com/u/6887042?v=3","gravatar_id":"","url":"https://api.github.com/users/ipovalyaev","html_url":"https://github.com/ipovalyaev","followers_url":"https://api.github.com/users/ipovalyaev/followers","following_url":"https://api.github.com/users/ipovalyaev/following{/other_user}","gists_url":"https://api.github.com/users/ipovalyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/ipovalyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipovalyaev/subscriptions","organizations_url":"https://api.github.com/users/ipovalyaev/orgs","repos_url":"https://api.github.com/users/ipovalyaev/repos","events_url":"https://api.github.com/users/ipovalyaev/events{/privacy}","received_events_url":"https://api.github.com/users/ipovalyaev/received_events","type":"User","site_admin":false},"body":"Added an option to edit a user profile once one is logged Also minor changes to read me about mysql DB.","created_at":"2016-10-16T19:04:27Z","updated_at":"2016-10-25T15:54:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7189a236f37648c525c98bf1f92318d586e4ffd1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36/commits","review_comments_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36/comments","review_comment_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/36/comments","statuses_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/statuses/674e144b523d5bac18379f6ddb9ab057932af130","head":{"label":"ipovalyaev:profile_update","ref":"profile_update","sha":"674e144b523d5bac18379f6ddb9ab057932af130","user":{"login":"ipovalyaev","id":6887042,"avatar_url":"https://avatars.githubusercontent.com/u/6887042?v=3","gravatar_id":"","url":"https://api.github.com/users/ipovalyaev","html_url":"https://github.com/ipovalyaev","followers_url":"https://api.github.com/users/ipovalyaev/followers","following_url":"https://api.github.com/users/ipovalyaev/following{/other_user}","gists_url":"https://api.github.com/users/ipovalyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/ipovalyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipovalyaev/subscriptions","organizations_url":"https://api.github.com/users/ipovalyaev/orgs","repos_url":"https://api.github.com/users/ipovalyaev/repos","events_url":"https://api.github.com/users/ipovalyaev/events{/privacy}","received_events_url":"https://api.github.com/users/ipovalyaev/received_events","type":"User","site_admin":false},"repo":{"id":71032379,"name":"bitstarter","full_name":"ipovalyaev/bitstarter","owner":{"login":"ipovalyaev","id":6887042,"avatar_url":"https://avatars.githubusercontent.com/u/6887042?v=3","gravatar_id":"","url":"https://api.github.com/users/ipovalyaev","html_url":"https://github.com/ipovalyaev","followers_url":"https://api.github.com/users/ipovalyaev/followers","following_url":"https://api.github.com/users/ipovalyaev/following{/other_user}","gists_url":"https://api.github.com/users/ipovalyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/ipovalyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipovalyaev/subscriptions","organizations_url":"https://api.github.com/users/ipovalyaev/orgs","repos_url":"https://api.github.com/users/ipovalyaev/repos","events_url":"https://api.github.com/users/ipovalyaev/events{/privacy}","received_events_url":"https://api.github.com/users/ipovalyaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ipovalyaev/bitstarter","description":null,"fork":true,"url":"https://api.github.com/repos/ipovalyaev/bitstarter","forks_url":"https://api.github.com/repos/ipovalyaev/bitstarter/forks","keys_url":"https://api.github.com/repos/ipovalyaev/bitstarter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipovalyaev/bitstarter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipovalyaev/bitstarter/teams","hooks_url":"https://api.github.com/repos/ipovalyaev/bitstarter/hooks","issue_events_url":"https://api.github.com/repos/ipovalyaev/bitstarter/issues/events{/number}","events_url":"https://api.github.com/repos/ipovalyaev/bitstarter/events","assignees_url":"https://api.github.com/repos/ipovalyaev/bitstarter/assignees{/user}","branches_url":"https://api.github.com/repos/ipovalyaev/bitstarter/branches{/branch}","tags_url":"https://api.github.com/repos/ipovalyaev/bitstarter/tags","blobs_url":"https://api.github.com/repos/ipovalyaev/bitstarter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipovalyaev/bitstarter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipovalyaev/bitstarter/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipovalyaev/bitstarter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipovalyaev/bitstarter/statuses/{sha}","languages_url":"https://api.github.com/repos/ipovalyaev/bitstarter/languages","stargazers_url":"https://api.github.com/repos/ipovalyaev/bitstarter/stargazers","contributors_url":"https://api.github.com/repos/ipovalyaev/bitstarter/contributors","subscribers_url":"https://api.github.com/repos/ipovalyaev/bitstarter/subscribers","subscription_url":"https://api.github.com/repos/ipovalyaev/bitstarter/subscription","commits_url":"https://api.github.com/repos/ipovalyaev/bitstarter/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipovalyaev/bitstarter/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipovalyaev/bitstarter/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipovalyaev/bitstarter/issues/comments{/number}","contents_url":"https://api.github.com/repos/ipovalyaev/bitstarter/contents/{+path}","compare_url":"https://api.github.com/repos/ipovalyaev/bitstarter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipovalyaev/bitstarter/merges","archive_url":"https://api.github.com/repos/ipovalyaev/bitstarter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipovalyaev/bitstarter/downloads","issues_url":"https://api.github.com/repos/ipovalyaev/bitstarter/issues{/number}","pulls_url":"https://api.github.com/repos/ipovalyaev/bitstarter/pulls{/number}","milestones_url":"https://api.github.com/repos/ipovalyaev/bitstarter/milestones{/number}","notifications_url":"https://api.github.com/repos/ipovalyaev/bitstarter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipovalyaev/bitstarter/labels{/name}","releases_url":"https://api.github.com/repos/ipovalyaev/bitstarter/releases{/id}","deployments_url":"https://api.github.com/repos/ipovalyaev/bitstarter/deployments","created_at":"2016-10-16T05:38:58Z","updated_at":"2016-10-16T05:38:59Z","pushed_at":"2016-10-24T17:09:08Z","git_url":"git://github.com/ipovalyaev/bitstarter.git","ssh_url":"git@github.com:ipovalyaev/bitstarter.git","clone_url":"https://github.com/ipovalyaev/bitstarter.git","svn_url":"https://github.com/ipovalyaev/bitstarter","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Learn-by-doing:master","ref":"master","sha":"585245a677be78b863c3e799c5af69b2943f373c","user":{"login":"Learn-by-doing","id":17272638,"avatar_url":"https://avatars.githubusercontent.com/u/17272638?v=3","gravatar_id":"","url":"https://api.github.com/users/Learn-by-doing","html_url":"https://github.com/Learn-by-doing","followers_url":"https://api.github.com/users/Learn-by-doing/followers","following_url":"https://api.github.com/users/Learn-by-doing/following{/other_user}","gists_url":"https://api.github.com/users/Learn-by-doing/gists{/gist_id}","starred_url":"https://api.github.com/users/Learn-by-doing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Learn-by-doing/subscriptions","organizations_url":"https://api.github.com/users/Learn-by-doing/orgs","repos_url":"https://api.github.com/users/Learn-by-doing/repos","events_url":"https://api.github.com/users/Learn-by-doing/events{/privacy}","received_events_url":"https://api.github.com/users/Learn-by-doing/received_events","type":"Organization","site_admin":false},"repo":{"id":65219321,"name":"bitstarter","full_name":"Learn-by-doing/bitstarter","owner":{"login":"Learn-by-doing","id":17272638,"avatar_url":"https://avatars.githubusercontent.com/u/17272638?v=3","gravatar_id":"","url":"https://api.github.com/users/Learn-by-doing","html_url":"https://github.com/Learn-by-doing","followers_url":"https://api.github.com/users/Learn-by-doing/followers","following_url":"https://api.github.com/users/Learn-by-doing/following{/other_user}","gists_url":"https://api.github.com/users/Learn-by-doing/gists{/gist_id}","starred_url":"https://api.github.com/users/Learn-by-doing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Learn-by-doing/subscriptions","organizations_url":"https://api.github.com/users/Learn-by-doing/orgs","repos_url":"https://api.github.com/users/Learn-by-doing/repos","events_url":"https://api.github.com/users/Learn-by-doing/events{/privacy}","received_events_url":"https://api.github.com/users/Learn-by-doing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Learn-by-doing/bitstarter","description":null,"fork":false,"url":"https://api.github.com/repos/Learn-by-doing/bitstarter","forks_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/forks","keys_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/teams","hooks_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/hooks","issue_events_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/events{/number}","events_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/events","assignees_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/assignees{/user}","branches_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/branches{/branch}","tags_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/tags","blobs_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/git/refs{/sha}","trees_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/statuses/{sha}","languages_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/languages","stargazers_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/stargazers","contributors_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/contributors","subscribers_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/subscribers","subscription_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/subscription","commits_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/commits{/sha}","git_commits_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/git/commits{/sha}","comments_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/comments{/number}","issue_comment_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/comments{/number}","contents_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/contents/{+path}","compare_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/merges","archive_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/downloads","issues_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues{/number}","pulls_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls{/number}","milestones_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/milestones{/number}","notifications_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/labels{/name}","releases_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/releases{/id}","deployments_url":"https://api.github.com/repos/Learn-by-doing/bitstarter/deployments","created_at":"2016-08-08T16:12:01Z","updated_at":"2016-10-24T17:39:25Z","pushed_at":"2016-10-25T15:46:19Z","git_url":"git://github.com/Learn-by-doing/bitstarter.git","ssh_url":"git@github.com:Learn-by-doing/bitstarter.git","clone_url":"https://github.com/Learn-by-doing/bitstarter.git","svn_url":"https://github.com/Learn-by-doing/bitstarter","homepage":null,"size":72,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":10,"forks":18,"open_issues":10,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36"},"html":{"href":"https://github.com/Learn-by-doing/bitstarter/pull/36"},"issue":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/36"},"comments":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/Learn-by-doing/bitstarter/statuses/674e144b523d5bac18379f6ddb9ab057932af130"}}}}
{"actor":{"display_login":"chill117"}}