{"action":"created","comment":{"url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/comments/78287678","id":78287678,"diff_hunk":"@@ -0,0 +1,115 @@\n+var errors = require('../errors');\n+var services = require('../services');\n+var roles = require('../utils/roles');\n+\n+var bodyParser = require('body-parser');\n+var middleware = require('../middleware');\n+var router = require('express').Router();\n+\n+function joinTeam (req, res, next) {\n+  var email = req.auth.email;\n+  var teamName = req.body.teamName;\n+\n+  return services.UserService.findUserByEmail(email)\n+  .then(function(user){\n+\treturn services.TeamService\n+\t  .addUserToTeam(user, teamName);\n+  })\n+  .then(function(team){","path":"api/v1/controllers/TeamController.js","position":18,"original_position":18,"commit_id":"00089182b0d690e2b427a7855b7d0ac58b843faf","original_commit_id":"00089182b0d690e2b427a7855b7d0ac58b843faf","user":{"login":"shotaroikeda","id":9062304,"avatar_url":"https://avatars.githubusercontent.com/u/9062304?v=3","gravatar_id":"","url":"https://api.github.com/users/shotaroikeda","html_url":"https://github.com/shotaroikeda","followers_url":"https://api.github.com/users/shotaroikeda/followers","following_url":"https://api.github.com/users/shotaroikeda/following{/other_user}","gists_url":"https://api.github.com/users/shotaroikeda/gists{/gist_id}","starred_url":"https://api.github.com/users/shotaroikeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shotaroikeda/subscriptions","organizations_url":"https://api.github.com/users/shotaroikeda/orgs","repos_url":"https://api.github.com/users/shotaroikeda/repos","events_url":"https://api.github.com/users/shotaroikeda/events{/privacy}","received_events_url":"https://api.github.com/users/shotaroikeda/received_events","type":"User","site_admin":false},"body":"Well my note disappeared, so in case:\r\nAny reasons as to why you are using this instead of\r\n```javascript\r\nthen(function(team){\r\n    res.body = team.toJSON();\r\n    next();\r\n    return null;\r\n})","created_at":"2016-09-11T04:33:35Z","updated_at":"2016-09-11T04:33:35Z","html_url":"https://github.com/HackIllinois/api-2017/pull/22#discussion_r78287678","pull_request_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/comments/78287678"},"html":{"href":"https://github.com/HackIllinois/api-2017/pull/22#discussion_r78287678"},"pull_request":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22","id":81535365,"html_url":"https://github.com/HackIllinois/api-2017/pull/22","diff_url":"https://github.com/HackIllinois/api-2017/pull/22.diff","patch_url":"https://github.com/HackIllinois/api-2017/pull/22.patch","issue_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/22","number":22,"state":"open","locked":false,"title":"Registration","user":{"login":"J0Nreynolds","id":5325576,"avatar_url":"https://avatars.githubusercontent.com/u/5325576?v=3","gravatar_id":"","url":"https://api.github.com/users/J0Nreynolds","html_url":"https://github.com/J0Nreynolds","followers_url":"https://api.github.com/users/J0Nreynolds/followers","following_url":"https://api.github.com/users/J0Nreynolds/following{/other_user}","gists_url":"https://api.github.com/users/J0Nreynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/J0Nreynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/J0Nreynolds/subscriptions","organizations_url":"https://api.github.com/users/J0Nreynolds/orgs","repos_url":"https://api.github.com/users/J0Nreynolds/repos","events_url":"https://api.github.com/users/J0Nreynolds/events{/privacy}","received_events_url":"https://api.github.com/users/J0Nreynolds/received_events","type":"User","site_admin":false},"body":"Summary of changes:\r\n- [X] Refactor schema to hold firstName and lastName on users, tshirtSize on registrations\r\n- [X] Multi-role registration creation, updating, and fetching\r\n- [X] Registration utilities\r\n- [X] Ability to add self to team, update team, get team information, and remove self from team\r\n- [X] Registration submission and withdrawal\r\n- [X] Storage integration for resume upload\r\n\r\nThings to-do:\r\n- [ ] Decide whether to integrate the Bookshelf registry plugin for all models\r\n- [x] Storage integration","created_at":"2016-08-16T20:05:54Z","updated_at":"2016-09-11T04:33:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4416a6f24f2f0bc430f91904822a4e7fb56e509","assignee":{"login":"nmagerko","id":3152067,"avatar_url":"https://avatars.githubusercontent.com/u/3152067?v=3","gravatar_id":"","url":"https://api.github.com/users/nmagerko","html_url":"https://github.com/nmagerko","followers_url":"https://api.github.com/users/nmagerko/followers","following_url":"https://api.github.com/users/nmagerko/following{/other_user}","gists_url":"https://api.github.com/users/nmagerko/gists{/gist_id}","starred_url":"https://api.github.com/users/nmagerko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmagerko/subscriptions","organizations_url":"https://api.github.com/users/nmagerko/orgs","repos_url":"https://api.github.com/users/nmagerko/repos","events_url":"https://api.github.com/users/nmagerko/events{/privacy}","received_events_url":"https://api.github.com/users/nmagerko/received_events","type":"User","site_admin":false},"assignees":[{"login":"nmagerko","id":3152067,"avatar_url":"https://avatars.githubusercontent.com/u/3152067?v=3","gravatar_id":"","url":"https://api.github.com/users/nmagerko","html_url":"https://github.com/nmagerko","followers_url":"https://api.github.com/users/nmagerko/followers","following_url":"https://api.github.com/users/nmagerko/following{/other_user}","gists_url":"https://api.github.com/users/nmagerko/gists{/gist_id}","starred_url":"https://api.github.com/users/nmagerko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmagerko/subscriptions","organizations_url":"https://api.github.com/users/nmagerko/orgs","repos_url":"https://api.github.com/users/nmagerko/repos","events_url":"https://api.github.com/users/nmagerko/events{/privacy}","received_events_url":"https://api.github.com/users/nmagerko/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22/commits","review_comments_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22/comments","review_comment_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/22/comments","statuses_url":"https://api.github.com/repos/HackIllinois/api-2017/statuses/00089182b0d690e2b427a7855b7d0ac58b843faf","head":{"label":"HackIllinois:feature/registration","ref":"feature/registration","sha":"00089182b0d690e2b427a7855b7d0ac58b843faf","user":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars.githubusercontent.com/u/5751098?v=3","gravatar_id":"","url":"https://api.github.com/users/HackIllinois","html_url":"https://github.com/HackIllinois","followers_url":"https://api.github.com/users/HackIllinois/followers","following_url":"https://api.github.com/users/HackIllinois/following{/other_user}","gists_url":"https://api.github.com/users/HackIllinois/gists{/gist_id}","starred_url":"https://api.github.com/users/HackIllinois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackIllinois/subscriptions","organizations_url":"https://api.github.com/users/HackIllinois/orgs","repos_url":"https://api.github.com/users/HackIllinois/repos","events_url":"https://api.github.com/users/HackIllinois/events{/privacy}","received_events_url":"https://api.github.com/users/HackIllinois/received_events","type":"Organization","site_admin":false},"repo":{"id":60983966,"name":"api-2017","full_name":"HackIllinois/api-2017","owner":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars.githubusercontent.com/u/5751098?v=3","gravatar_id":"","url":"https://api.github.com/users/HackIllinois","html_url":"https://github.com/HackIllinois","followers_url":"https://api.github.com/users/HackIllinois/followers","following_url":"https://api.github.com/users/HackIllinois/following{/other_user}","gists_url":"https://api.github.com/users/HackIllinois/gists{/gist_id}","starred_url":"https://api.github.com/users/HackIllinois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackIllinois/subscriptions","organizations_url":"https://api.github.com/users/HackIllinois/orgs","repos_url":"https://api.github.com/users/HackIllinois/repos","events_url":"https://api.github.com/users/HackIllinois/events{/privacy}","received_events_url":"https://api.github.com/users/HackIllinois/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HackIllinois/api-2017","description":"The back-end services supporting HackIllinois 2017","fork":false,"url":"https://api.github.com/repos/HackIllinois/api-2017","forks_url":"https://api.github.com/repos/HackIllinois/api-2017/forks","keys_url":"https://api.github.com/repos/HackIllinois/api-2017/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackIllinois/api-2017/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackIllinois/api-2017/teams","hooks_url":"https://api.github.com/repos/HackIllinois/api-2017/hooks","issue_events_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/events{/number}","events_url":"https://api.github.com/repos/HackIllinois/api-2017/events","assignees_url":"https://api.github.com/repos/HackIllinois/api-2017/assignees{/user}","branches_url":"https://api.github.com/repos/HackIllinois/api-2017/branches{/branch}","tags_url":"https://api.github.com/repos/HackIllinois/api-2017/tags","blobs_url":"https://api.github.com/repos/HackIllinois/api-2017/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackIllinois/api-2017/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackIllinois/api-2017/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackIllinois/api-2017/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackIllinois/api-2017/statuses/{sha}","languages_url":"https://api.github.com/repos/HackIllinois/api-2017/languages","stargazers_url":"https://api.github.com/repos/HackIllinois/api-2017/stargazers","contributors_url":"https://api.github.com/repos/HackIllinois/api-2017/contributors","subscribers_url":"https://api.github.com/repos/HackIllinois/api-2017/subscribers","subscription_url":"https://api.github.com/repos/HackIllinois/api-2017/subscription","commits_url":"https://api.github.com/repos/HackIllinois/api-2017/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackIllinois/api-2017/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackIllinois/api-2017/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackIllinois/api-2017/contents/{+path}","compare_url":"https://api.github.com/repos/HackIllinois/api-2017/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackIllinois/api-2017/merges","archive_url":"https://api.github.com/repos/HackIllinois/api-2017/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackIllinois/api-2017/downloads","issues_url":"https://api.github.com/repos/HackIllinois/api-2017/issues{/number}","pulls_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls{/number}","milestones_url":"https://api.github.com/repos/HackIllinois/api-2017/milestones{/number}","notifications_url":"https://api.github.com/repos/HackIllinois/api-2017/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackIllinois/api-2017/labels{/name}","releases_url":"https://api.github.com/repos/HackIllinois/api-2017/releases{/id}","deployments_url":"https://api.github.com/repos/HackIllinois/api-2017/deployments","created_at":"2016-06-12T18:54:33Z","updated_at":"2016-09-04T03:10:46Z","pushed_at":"2016-09-09T04:34:15Z","git_url":"git://github.com/HackIllinois/api-2017.git","ssh_url":"git@github.com:HackIllinois/api-2017.git","clone_url":"https://github.com/HackIllinois/api-2017.git","svn_url":"https://github.com/HackIllinois/api-2017","homepage":"","size":202,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":1,"default_branch":"master"}},"base":{"label":"HackIllinois:staging","ref":"staging","sha":"024124b2faa60c84629b7f5d1aee585ae5cc0c5e","user":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars.githubusercontent.com/u/5751098?v=3","gravatar_id":"","url":"https://api.github.com/users/HackIllinois","html_url":"https://github.com/HackIllinois","followers_url":"https://api.github.com/users/HackIllinois/followers","following_url":"https://api.github.com/users/HackIllinois/following{/other_user}","gists_url":"https://api.github.com/users/HackIllinois/gists{/gist_id}","starred_url":"https://api.github.com/users/HackIllinois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackIllinois/subscriptions","organizations_url":"https://api.github.com/users/HackIllinois/orgs","repos_url":"https://api.github.com/users/HackIllinois/repos","events_url":"https://api.github.com/users/HackIllinois/events{/privacy}","received_events_url":"https://api.github.com/users/HackIllinois/received_events","type":"Organization","site_admin":false},"repo":{"id":60983966,"name":"api-2017","full_name":"HackIllinois/api-2017","owner":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars.githubusercontent.com/u/5751098?v=3","gravatar_id":"","url":"https://api.github.com/users/HackIllinois","html_url":"https://github.com/HackIllinois","followers_url":"https://api.github.com/users/HackIllinois/followers","following_url":"https://api.github.com/users/HackIllinois/following{/other_user}","gists_url":"https://api.github.com/users/HackIllinois/gists{/gist_id}","starred_url":"https://api.github.com/users/HackIllinois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HackIllinois/subscriptions","organizations_url":"https://api.github.com/users/HackIllinois/orgs","repos_url":"https://api.github.com/users/HackIllinois/repos","events_url":"https://api.github.com/users/HackIllinois/events{/privacy}","received_events_url":"https://api.github.com/users/HackIllinois/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HackIllinois/api-2017","description":"The back-end services supporting HackIllinois 2017","fork":false,"url":"https://api.github.com/repos/HackIllinois/api-2017","forks_url":"https://api.github.com/repos/HackIllinois/api-2017/forks","keys_url":"https://api.github.com/repos/HackIllinois/api-2017/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackIllinois/api-2017/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackIllinois/api-2017/teams","hooks_url":"https://api.github.com/repos/HackIllinois/api-2017/hooks","issue_events_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/events{/number}","events_url":"https://api.github.com/repos/HackIllinois/api-2017/events","assignees_url":"https://api.github.com/repos/HackIllinois/api-2017/assignees{/user}","branches_url":"https://api.github.com/repos/HackIllinois/api-2017/branches{/branch}","tags_url":"https://api.github.com/repos/HackIllinois/api-2017/tags","blobs_url":"https://api.github.com/repos/HackIllinois/api-2017/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackIllinois/api-2017/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackIllinois/api-2017/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackIllinois/api-2017/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackIllinois/api-2017/statuses/{sha}","languages_url":"https://api.github.com/repos/HackIllinois/api-2017/languages","stargazers_url":"https://api.github.com/repos/HackIllinois/api-2017/stargazers","contributors_url":"https://api.github.com/repos/HackIllinois/api-2017/contributors","subscribers_url":"https://api.github.com/repos/HackIllinois/api-2017/subscribers","subscription_url":"https://api.github.com/repos/HackIllinois/api-2017/subscription","commits_url":"https://api.github.com/repos/HackIllinois/api-2017/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackIllinois/api-2017/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackIllinois/api-2017/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackIllinois/api-2017/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackIllinois/api-2017/contents/{+path}","compare_url":"https://api.github.com/repos/HackIllinois/api-2017/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackIllinois/api-2017/merges","archive_url":"https://api.github.com/repos/HackIllinois/api-2017/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackIllinois/api-2017/downloads","issues_url":"https://api.github.com/repos/HackIllinois/api-2017/issues{/number}","pulls_url":"https://api.github.com/repos/HackIllinois/api-2017/pulls{/number}","milestones_url":"https://api.github.com/repos/HackIllinois/api-2017/milestones{/number}","notifications_url":"https://api.github.com/repos/HackIllinois/api-2017/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackIllinois/api-2017/labels{/name}","releases_url":"https://api.github.com/repos/HackIllinois/api-2017/releases{/id}","deployments_url":"https://api.github.com/repos/HackIllinois/api-2017/deployments","created_at":"2016-06-12T18:54:33Z","updated_at":"2016-09-04T03:10:46Z","pushed_at":"2016-09-09T04:34:15Z","git_url":"git://github.com/HackIllinois/api-2017.git","ssh_url":"git@github.com:HackIllinois/api-2017.git","clone_url":"https://github.com/HackIllinois/api-2017.git","svn_url":"https://github.com/HackIllinois/api-2017","homepage":"","size":202,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22"},"html":{"href":"https://github.com/HackIllinois/api-2017/pull/22"},"issue":{"href":"https://api.github.com/repos/HackIllinois/api-2017/issues/22"},"comments":{"href":"https://api.github.com/repos/HackIllinois/api-2017/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackIllinois/api-2017/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/HackIllinois/api-2017/statuses/00089182b0d690e2b427a7855b7d0ac58b843faf"}}}}
{"actor":{"display_login":"shotaroikeda"}}