{"action":"created","comment":{"url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/comments/104297273","pull_request_review_id":25131757,"id":104297273,"diff_hunk":"@@ -0,0 +1,66 @@\n+var response = require('../Objects/response.js');\n+var userModels = require('./userModels');\n+var Student = userModels.Student;\n+var Admin = userModels.Admin;\n+\n+var createUser = (json) => {\n+  if (json.role == 'Student') {\n+    // Create new student.\n+    var student = new Student({\n+      approvalStatus: false,\n+      email: json.email,\n+      firstName: json.firstName,\n+      lastName: json.lastName,\n+      points: 0,\n+      role: 'Student',\n+      studentId: getUid();\n+    });\n+  // TODO(ryanfaulkenberry100): Write student to database.\n+\n+  } else if (json.role == 'Admin') {\n+    // Create new admin.\n+    var admin = new Admin({\n+      email: json.email,\n+      firstName: json.firstName,\n+      lastName: json.lastName,\n+      role: 'Admin'\n+    });\n+  // TODO(ryanfaulkenberry100): Write admin to database.\n+\n+  }\n+\n+    return new response.ResponseObject(201, {\"uid\":\"1\", \"url\":\"//www.google.com\"});\n+}\n+\n+var modifyUser = (id, json) => {\n+  // TODO(ryanfaulkenberry100): Check if modifier is a user or an admin.\n+  if () {\n+    // Modify user as self.","path":"users/service.js","position":38,"original_position":38,"commit_id":"15a812e2d8e7e28182c1b88bf3e0ec94392cb900","original_commit_id":"15a812e2d8e7e28182c1b88bf3e0ec94392cb900","user":{"login":"jmtaber129","id":9013217,"avatar_url":"https://avatars1.githubusercontent.com/u/9013217?v=3","gravatar_id":"","url":"https://api.github.com/users/jmtaber129","html_url":"https://github.com/jmtaber129","followers_url":"https://api.github.com/users/jmtaber129/followers","following_url":"https://api.github.com/users/jmtaber129/following{/other_user}","gists_url":"https://api.github.com/users/jmtaber129/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtaber129/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtaber129/subscriptions","organizations_url":"https://api.github.com/users/jmtaber129/orgs","repos_url":"https://api.github.com/users/jmtaber129/repos","events_url":"https://api.github.com/users/jmtaber129/events{/privacy}","received_events_url":"https://api.github.com/users/jmtaber129/received_events","type":"User","site_admin":false},"body":"Since the function name is ```modifyUserAsSelf()```, this comment is redundant.  Same with ```modifyUserAsAdmin()```.","created_at":"2017-03-04T21:13:15Z","updated_at":"2017-03-04T21:17:35Z","html_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17#discussion_r104297273","pull_request_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/comments/104297273"},"html":{"href":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17#discussion_r104297273"},"pull_request":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17","id":108831727,"html_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17","diff_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17.diff","patch_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17.patch","issue_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/17","number":17,"state":"open","locked":false,"title":"User schemas","user":{"login":"ryanfaulkenberry100","id":25509404,"avatar_url":"https://avatars2.githubusercontent.com/u/25509404?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanfaulkenberry100","html_url":"https://github.com/ryanfaulkenberry100","followers_url":"https://api.github.com/users/ryanfaulkenberry100/followers","following_url":"https://api.github.com/users/ryanfaulkenberry100/following{/other_user}","gists_url":"https://api.github.com/users/ryanfaulkenberry100/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanfaulkenberry100/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanfaulkenberry100/subscriptions","organizations_url":"https://api.github.com/users/ryanfaulkenberry100/orgs","repos_url":"https://api.github.com/users/ryanfaulkenberry100/repos","events_url":"https://api.github.com/users/ryanfaulkenberry100/events{/privacy}","received_events_url":"https://api.github.com/users/ryanfaulkenberry100/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-02T19:23:51Z","updated_at":"2017-03-04T21:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"743d7cc3e9b57df8d5d2b7176d9ec82a597d1557","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17/commits","review_comments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17/comments","review_comment_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/17/comments","statuses_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/statuses/15a812e2d8e7e28182c1b88bf3e0ec94392cb900","head":{"label":"TTUSDC:user-schema","ref":"user-schema","sha":"15a812e2d8e7e28182c1b88bf3e0ec94392cb900","user":{"login":"TTUSDC","id":14301610,"avatar_url":"https://avatars0.githubusercontent.com/u/14301610?v=3","gravatar_id":"","url":"https://api.github.com/users/TTUSDC","html_url":"https://github.com/TTUSDC","followers_url":"https://api.github.com/users/TTUSDC/followers","following_url":"https://api.github.com/users/TTUSDC/following{/other_user}","gists_url":"https://api.github.com/users/TTUSDC/gists{/gist_id}","starred_url":"https://api.github.com/users/TTUSDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTUSDC/subscriptions","organizations_url":"https://api.github.com/users/TTUSDC/orgs","repos_url":"https://api.github.com/users/TTUSDC/repos","events_url":"https://api.github.com/users/TTUSDC/events{/privacy}","received_events_url":"https://api.github.com/users/TTUSDC/received_events","type":"Organization","site_admin":false},"repo":{"id":81041324,"name":"CPCEEDWebAppBackend","full_name":"TTUSDC/CPCEEDWebAppBackend","owner":{"login":"TTUSDC","id":14301610,"avatar_url":"https://avatars0.githubusercontent.com/u/14301610?v=3","gravatar_id":"","url":"https://api.github.com/users/TTUSDC","html_url":"https://github.com/TTUSDC","followers_url":"https://api.github.com/users/TTUSDC/followers","following_url":"https://api.github.com/users/TTUSDC/following{/other_user}","gists_url":"https://api.github.com/users/TTUSDC/gists{/gist_id}","starred_url":"https://api.github.com/users/TTUSDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTUSDC/subscriptions","organizations_url":"https://api.github.com/users/TTUSDC/orgs","repos_url":"https://api.github.com/users/TTUSDC/repos","events_url":"https://api.github.com/users/TTUSDC/events{/privacy}","received_events_url":"https://api.github.com/users/TTUSDC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend","description":"Backend NodeJS server for the CPCEEDWebApp","fork":false,"url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend","forks_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/forks","keys_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/teams","hooks_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/hooks","issue_events_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/events{/number}","events_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/events","assignees_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/assignees{/user}","branches_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/branches{/branch}","tags_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/tags","blobs_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/refs{/sha}","trees_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/statuses/{sha}","languages_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/languages","stargazers_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/stargazers","contributors_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/contributors","subscribers_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/subscribers","subscription_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/subscription","commits_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/commits{/sha}","git_commits_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/commits{/sha}","comments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/comments{/number}","issue_comment_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/comments{/number}","contents_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/contents/{+path}","compare_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/merges","archive_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/downloads","issues_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues{/number}","pulls_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls{/number}","milestones_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/milestones{/number}","notifications_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/labels{/name}","releases_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/releases{/id}","deployments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/deployments","created_at":"2017-02-06T02:48:27Z","updated_at":"2017-03-03T01:24:17Z","pushed_at":"2017-03-04T21:09:53Z","git_url":"git://github.com/TTUSDC/CPCEEDWebAppBackend.git","ssh_url":"git@github.com:TTUSDC/CPCEEDWebAppBackend.git","clone_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend.git","svn_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend","homepage":null,"size":25,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":2,"default_branch":"master"}},"base":{"label":"TTUSDC:master","ref":"master","sha":"c64fb20227d4f19abbeeb64948e8b8eb1611f5ab","user":{"login":"TTUSDC","id":14301610,"avatar_url":"https://avatars0.githubusercontent.com/u/14301610?v=3","gravatar_id":"","url":"https://api.github.com/users/TTUSDC","html_url":"https://github.com/TTUSDC","followers_url":"https://api.github.com/users/TTUSDC/followers","following_url":"https://api.github.com/users/TTUSDC/following{/other_user}","gists_url":"https://api.github.com/users/TTUSDC/gists{/gist_id}","starred_url":"https://api.github.com/users/TTUSDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTUSDC/subscriptions","organizations_url":"https://api.github.com/users/TTUSDC/orgs","repos_url":"https://api.github.com/users/TTUSDC/repos","events_url":"https://api.github.com/users/TTUSDC/events{/privacy}","received_events_url":"https://api.github.com/users/TTUSDC/received_events","type":"Organization","site_admin":false},"repo":{"id":81041324,"name":"CPCEEDWebAppBackend","full_name":"TTUSDC/CPCEEDWebAppBackend","owner":{"login":"TTUSDC","id":14301610,"avatar_url":"https://avatars0.githubusercontent.com/u/14301610?v=3","gravatar_id":"","url":"https://api.github.com/users/TTUSDC","html_url":"https://github.com/TTUSDC","followers_url":"https://api.github.com/users/TTUSDC/followers","following_url":"https://api.github.com/users/TTUSDC/following{/other_user}","gists_url":"https://api.github.com/users/TTUSDC/gists{/gist_id}","starred_url":"https://api.github.com/users/TTUSDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TTUSDC/subscriptions","organizations_url":"https://api.github.com/users/TTUSDC/orgs","repos_url":"https://api.github.com/users/TTUSDC/repos","events_url":"https://api.github.com/users/TTUSDC/events{/privacy}","received_events_url":"https://api.github.com/users/TTUSDC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend","description":"Backend NodeJS server for the CPCEEDWebApp","fork":false,"url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend","forks_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/forks","keys_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/teams","hooks_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/hooks","issue_events_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/events{/number}","events_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/events","assignees_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/assignees{/user}","branches_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/branches{/branch}","tags_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/tags","blobs_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/refs{/sha}","trees_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/statuses/{sha}","languages_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/languages","stargazers_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/stargazers","contributors_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/contributors","subscribers_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/subscribers","subscription_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/subscription","commits_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/commits{/sha}","git_commits_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/git/commits{/sha}","comments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/comments{/number}","issue_comment_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/comments{/number}","contents_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/contents/{+path}","compare_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/merges","archive_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/downloads","issues_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues{/number}","pulls_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls{/number}","milestones_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/milestones{/number}","notifications_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/labels{/name}","releases_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/releases{/id}","deployments_url":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/deployments","created_at":"2017-02-06T02:48:27Z","updated_at":"2017-03-03T01:24:17Z","pushed_at":"2017-03-04T21:09:53Z","git_url":"git://github.com/TTUSDC/CPCEEDWebAppBackend.git","ssh_url":"git@github.com:TTUSDC/CPCEEDWebAppBackend.git","clone_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend.git","svn_url":"https://github.com/TTUSDC/CPCEEDWebAppBackend","homepage":null,"size":25,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17"},"html":{"href":"https://github.com/TTUSDC/CPCEEDWebAppBackend/pull/17"},"issue":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/17"},"comments":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/TTUSDC/CPCEEDWebAppBackend/statuses/15a812e2d8e7e28182c1b88bf3e0ec94392cb900"}}}}
{"actor":{"display_login":"jmtaber129"}}