{"action":"created","comment":{"url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/comments/24790116","id":24790116,"diff_hunk":"@@ -41,7 +41,7 @@ server.use(function(req, res, next) {\n });\n \n // routes ======================================================================\n-server.use(subdomain('api', require('./routes/api'))); // load our api routes and configure them to use the api subdomain\n+server.use(subdomain('api', require('./routes/api')(passport))); // load our api routes and configure them to use the api subdomain","path":"app/server.js","position":5,"original_position":5,"commit_id":"1ff6520de55671bd1d9ce8e0bd271eed827505a0","original_commit_id":"1ff6520de55671bd1d9ce8e0bd271eed827505a0","user":{"login":"trjast","id":4220080,"avatar_url":"https://avatars.githubusercontent.com/u/4220080?v=3","gravatar_id":"","url":"https://api.github.com/users/trjast","html_url":"https://github.com/trjast","followers_url":"https://api.github.com/users/trjast/followers","following_url":"https://api.github.com/users/trjast/following{/other_user}","gists_url":"https://api.github.com/users/trjast/gists{/gist_id}","starred_url":"https://api.github.com/users/trjast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trjast/subscriptions","organizations_url":"https://api.github.com/users/trjast/orgs","repos_url":"https://api.github.com/users/trjast/repos","events_url":"https://api.github.com/users/trjast/events{/privacy}","received_events_url":"https://api.github.com/users/trjast/received_events","type":"User","site_admin":false},"body":"because as far as I could tell, it needed to be the same instance which the server initializes. The alternative is having ALL the routes and passport config in server.js which is much messier. [I got this idea from here](https://scotch.io/tutorials/easy-node-authentication-setup-and-local)","created_at":"2015-02-17T03:14:38Z","updated_at":"2015-02-17T03:14:38Z","html_url":"https://github.com/hashtag-include/arewegood-web/pull/6#discussion_r24790116","pull_request_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/comments/24790116"},"html":{"href":"https://github.com/hashtag-include/arewegood-web/pull/6#discussion_r24790116"},"pull_request":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6","id":29350241,"html_url":"https://github.com/hashtag-include/arewegood-web/pull/6","diff_url":"https://github.com/hashtag-include/arewegood-web/pull/6.diff","patch_url":"https://github.com/hashtag-include/arewegood-web/pull/6.patch","issue_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/6","number":6,"state":"open","locked":false,"title":"Passport serialization","user":{"login":"trjast","id":4220080,"avatar_url":"https://avatars.githubusercontent.com/u/4220080?v=3","gravatar_id":"","url":"https://api.github.com/users/trjast","html_url":"https://github.com/trjast","followers_url":"https://api.github.com/users/trjast/followers","following_url":"https://api.github.com/users/trjast/following{/other_user}","gists_url":"https://api.github.com/users/trjast/gists{/gist_id}","starred_url":"https://api.github.com/users/trjast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trjast/subscriptions","organizations_url":"https://api.github.com/users/trjast/orgs","repos_url":"https://api.github.com/users/trjast/repos","events_url":"https://api.github.com/users/trjast/events{/privacy}","received_events_url":"https://api.github.com/users/trjast/received_events","type":"User","site_admin":false},"body":"@bengreenier could use a sign off on this -- resolves #2 \r\n\r\nNotable Changes: \r\n- Restructured the models and DB structure. There is now a concept of accounts which have a list of users and a list of logs, so multiple users can be added to the same account. \r\n- API keys are generated and kept in the DB instead of just using the GitHub user id. \r\n- Added support for [passport-http-bearer](https://www.npmjs.com/package/passport-http-bearer) on all the api endpoints. To get your api key, run the service and sign into your account. \r\n- Updated GitHub permissions to request info for user email addresses and repositories (probably don't need read/write to repos and instead just need read-only to the list of repos). \r\n\r\nUp Next:\r\n- Write comments for days and days\r\n- Still need the ability to create an account separate from the sign in page, and add the ability to add other users to the account.\r\n- AJAX in account logs\r\n- Logs need to be specific to repository, not just an account","created_at":"2015-02-16T05:09:55Z","updated_at":"2015-02-17T03:14:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d48b27a3a4aa0da7f53c4c542a2b648badda0277","assignee":{"login":"bengreenier","id":1167891,"avatar_url":"https://avatars.githubusercontent.com/u/1167891?v=3","gravatar_id":"","url":"https://api.github.com/users/bengreenier","html_url":"https://github.com/bengreenier","followers_url":"https://api.github.com/users/bengreenier/followers","following_url":"https://api.github.com/users/bengreenier/following{/other_user}","gists_url":"https://api.github.com/users/bengreenier/gists{/gist_id}","starred_url":"https://api.github.com/users/bengreenier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bengreenier/subscriptions","organizations_url":"https://api.github.com/users/bengreenier/orgs","repos_url":"https://api.github.com/users/bengreenier/repos","events_url":"https://api.github.com/users/bengreenier/events{/privacy}","received_events_url":"https://api.github.com/users/bengreenier/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6/commits","review_comments_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6/comments","review_comment_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/6/comments","statuses_url":"https://api.github.com/repos/hashtag-include/arewegood-web/statuses/1ff6520de55671bd1d9ce8e0bd271eed827505a0","head":{"label":"hashtag-include:passport-serialization","ref":"passport-serialization","sha":"1ff6520de55671bd1d9ce8e0bd271eed827505a0","user":{"login":"hashtag-include","id":9328314,"avatar_url":"https://avatars.githubusercontent.com/u/9328314?v=3","gravatar_id":"","url":"https://api.github.com/users/hashtag-include","html_url":"https://github.com/hashtag-include","followers_url":"https://api.github.com/users/hashtag-include/followers","following_url":"https://api.github.com/users/hashtag-include/following{/other_user}","gists_url":"https://api.github.com/users/hashtag-include/gists{/gist_id}","starred_url":"https://api.github.com/users/hashtag-include/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashtag-include/subscriptions","organizations_url":"https://api.github.com/users/hashtag-include/orgs","repos_url":"https://api.github.com/users/hashtag-include/repos","events_url":"https://api.github.com/users/hashtag-include/events{/privacy}","received_events_url":"https://api.github.com/users/hashtag-include/received_events","type":"Organization","site_admin":false},"repo":{"id":26556439,"name":"arewegood-web","full_name":"hashtag-include/arewegood-web","owner":{"login":"hashtag-include","id":9328314,"avatar_url":"https://avatars.githubusercontent.com/u/9328314?v=3","gravatar_id":"","url":"https://api.github.com/users/hashtag-include","html_url":"https://github.com/hashtag-include","followers_url":"https://api.github.com/users/hashtag-include/followers","following_url":"https://api.github.com/users/hashtag-include/following{/other_user}","gists_url":"https://api.github.com/users/hashtag-include/gists{/gist_id}","starred_url":"https://api.github.com/users/hashtag-include/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashtag-include/subscriptions","organizations_url":"https://api.github.com/users/hashtag-include/orgs","repos_url":"https://api.github.com/users/hashtag-include/repos","events_url":"https://api.github.com/users/hashtag-include/events{/privacy}","received_events_url":"https://api.github.com/users/hashtag-include/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashtag-include/arewegood-web","description":"arewegood is a realtime error handling and uptime platform for web services and apps that matter to you.","fork":false,"url":"https://api.github.com/repos/hashtag-include/arewegood-web","forks_url":"https://api.github.com/repos/hashtag-include/arewegood-web/forks","keys_url":"https://api.github.com/repos/hashtag-include/arewegood-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashtag-include/arewegood-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashtag-include/arewegood-web/teams","hooks_url":"https://api.github.com/repos/hashtag-include/arewegood-web/hooks","issue_events_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/events{/number}","events_url":"https://api.github.com/repos/hashtag-include/arewegood-web/events","assignees_url":"https://api.github.com/repos/hashtag-include/arewegood-web/assignees{/user}","branches_url":"https://api.github.com/repos/hashtag-include/arewegood-web/branches{/branch}","tags_url":"https://api.github.com/repos/hashtag-include/arewegood-web/tags","blobs_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashtag-include/arewegood-web/statuses/{sha}","languages_url":"https://api.github.com/repos/hashtag-include/arewegood-web/languages","stargazers_url":"https://api.github.com/repos/hashtag-include/arewegood-web/stargazers","contributors_url":"https://api.github.com/repos/hashtag-include/arewegood-web/contributors","subscribers_url":"https://api.github.com/repos/hashtag-include/arewegood-web/subscribers","subscription_url":"https://api.github.com/repos/hashtag-include/arewegood-web/subscription","commits_url":"https://api.github.com/repos/hashtag-include/arewegood-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashtag-include/arewegood-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/comments/{number}","contents_url":"https://api.github.com/repos/hashtag-include/arewegood-web/contents/{+path}","compare_url":"https://api.github.com/repos/hashtag-include/arewegood-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashtag-include/arewegood-web/merges","archive_url":"https://api.github.com/repos/hashtag-include/arewegood-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashtag-include/arewegood-web/downloads","issues_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues{/number}","pulls_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls{/number}","milestones_url":"https://api.github.com/repos/hashtag-include/arewegood-web/milestones{/number}","notifications_url":"https://api.github.com/repos/hashtag-include/arewegood-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashtag-include/arewegood-web/labels{/name}","releases_url":"https://api.github.com/repos/hashtag-include/arewegood-web/releases{/id}","created_at":"2014-11-12T21:13:05Z","updated_at":"2015-02-13T20:38:58Z","pushed_at":"2015-02-16T04:55:10Z","git_url":"git://github.com/hashtag-include/arewegood-web.git","ssh_url":"git@github.com:hashtag-include/arewegood-web.git","clone_url":"https://github.com/hashtag-include/arewegood-web.git","svn_url":"https://github.com/hashtag-include/arewegood-web","homepage":"https://arewegood.io","size":1512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"hashtag-include:master","ref":"master","sha":"9733c96251b8f331dd10825129b04010d905a85b","user":{"login":"hashtag-include","id":9328314,"avatar_url":"https://avatars.githubusercontent.com/u/9328314?v=3","gravatar_id":"","url":"https://api.github.com/users/hashtag-include","html_url":"https://github.com/hashtag-include","followers_url":"https://api.github.com/users/hashtag-include/followers","following_url":"https://api.github.com/users/hashtag-include/following{/other_user}","gists_url":"https://api.github.com/users/hashtag-include/gists{/gist_id}","starred_url":"https://api.github.com/users/hashtag-include/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashtag-include/subscriptions","organizations_url":"https://api.github.com/users/hashtag-include/orgs","repos_url":"https://api.github.com/users/hashtag-include/repos","events_url":"https://api.github.com/users/hashtag-include/events{/privacy}","received_events_url":"https://api.github.com/users/hashtag-include/received_events","type":"Organization","site_admin":false},"repo":{"id":26556439,"name":"arewegood-web","full_name":"hashtag-include/arewegood-web","owner":{"login":"hashtag-include","id":9328314,"avatar_url":"https://avatars.githubusercontent.com/u/9328314?v=3","gravatar_id":"","url":"https://api.github.com/users/hashtag-include","html_url":"https://github.com/hashtag-include","followers_url":"https://api.github.com/users/hashtag-include/followers","following_url":"https://api.github.com/users/hashtag-include/following{/other_user}","gists_url":"https://api.github.com/users/hashtag-include/gists{/gist_id}","starred_url":"https://api.github.com/users/hashtag-include/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hashtag-include/subscriptions","organizations_url":"https://api.github.com/users/hashtag-include/orgs","repos_url":"https://api.github.com/users/hashtag-include/repos","events_url":"https://api.github.com/users/hashtag-include/events{/privacy}","received_events_url":"https://api.github.com/users/hashtag-include/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hashtag-include/arewegood-web","description":"arewegood is a realtime error handling and uptime platform for web services and apps that matter to you.","fork":false,"url":"https://api.github.com/repos/hashtag-include/arewegood-web","forks_url":"https://api.github.com/repos/hashtag-include/arewegood-web/forks","keys_url":"https://api.github.com/repos/hashtag-include/arewegood-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hashtag-include/arewegood-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hashtag-include/arewegood-web/teams","hooks_url":"https://api.github.com/repos/hashtag-include/arewegood-web/hooks","issue_events_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/events{/number}","events_url":"https://api.github.com/repos/hashtag-include/arewegood-web/events","assignees_url":"https://api.github.com/repos/hashtag-include/arewegood-web/assignees{/user}","branches_url":"https://api.github.com/repos/hashtag-include/arewegood-web/branches{/branch}","tags_url":"https://api.github.com/repos/hashtag-include/arewegood-web/tags","blobs_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hashtag-include/arewegood-web/statuses/{sha}","languages_url":"https://api.github.com/repos/hashtag-include/arewegood-web/languages","stargazers_url":"https://api.github.com/repos/hashtag-include/arewegood-web/stargazers","contributors_url":"https://api.github.com/repos/hashtag-include/arewegood-web/contributors","subscribers_url":"https://api.github.com/repos/hashtag-include/arewegood-web/subscribers","subscription_url":"https://api.github.com/repos/hashtag-include/arewegood-web/subscription","commits_url":"https://api.github.com/repos/hashtag-include/arewegood-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/hashtag-include/arewegood-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/hashtag-include/arewegood-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/comments/{number}","contents_url":"https://api.github.com/repos/hashtag-include/arewegood-web/contents/{+path}","compare_url":"https://api.github.com/repos/hashtag-include/arewegood-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hashtag-include/arewegood-web/merges","archive_url":"https://api.github.com/repos/hashtag-include/arewegood-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hashtag-include/arewegood-web/downloads","issues_url":"https://api.github.com/repos/hashtag-include/arewegood-web/issues{/number}","pulls_url":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls{/number}","milestones_url":"https://api.github.com/repos/hashtag-include/arewegood-web/milestones{/number}","notifications_url":"https://api.github.com/repos/hashtag-include/arewegood-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hashtag-include/arewegood-web/labels{/name}","releases_url":"https://api.github.com/repos/hashtag-include/arewegood-web/releases{/id}","created_at":"2014-11-12T21:13:05Z","updated_at":"2015-02-13T20:38:58Z","pushed_at":"2015-02-16T04:55:10Z","git_url":"git://github.com/hashtag-include/arewegood-web.git","ssh_url":"git@github.com:hashtag-include/arewegood-web.git","clone_url":"https://github.com/hashtag-include/arewegood-web.git","svn_url":"https://github.com/hashtag-include/arewegood-web","homepage":"https://arewegood.io","size":1512,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6"},"html":{"href":"https://github.com/hashtag-include/arewegood-web/pull/6"},"issue":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/6"},"comments":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/hashtag-include/arewegood-web/statuses/1ff6520de55671bd1d9ce8e0bd271eed827505a0"}}}}