{"action":"created","comment":{"url":"https://api.github.com/repos/HackIllinois/api/pulls/comments/169851105","pull_request_review_id":98444018,"id":169851105,"diff_hunk":"@@ -0,0 +1,51 @@\n+const bodyParser = require('body-parser');\n+\n+const services = require('../services');\n+\n+const middleware = require('../middleware');\n+const requests = require('../requests');\n+const roles = require('../utils/roles');\n+\n+const router = require('express').Router();\n+\n+function createApplication(req, res, next) {\n+  services.RecruiterInterestService\n+    .createApplication(req.user.get('id'), req.body.applicantId, req.body.comments, req.body.favorite)\n+    .then((application) => {\n+      res.body = application.toJSON();\n+      return next();\n+    })\n+    .catch((error) => next(error));\n+}\n+\n+function getRecruitersApplicants(req, res, next) {\n+  services.RecruiterInterestService\n+    .findByRecruiterId(req.user.get('id'))\n+    .then((applications) => {\n+      res.body = applications.toJSON();\n+      return next();\n+    })\n+    .catch((error) => next(error));\n+}\n+\n+function updateApplication(req, res, next) {\n+  services.RecruiterInterestService\n+    .updateApplication(req.body.appId, req.body.comments, req.body.favorite)\n+    .then((application) => {\n+      res.body = application.toJSON();\n+      return next();\n+    })\n+    .catch((error) => next(error));\n+}\n+\n+router.use(bodyParser.json());\n+router.use(middleware.auth);\n+\n+router.get('/', middleware.permission(roles.PROFESSIONALS),  getRecruitersApplicants);\n+router.post('/apply', middleware.request(requests.RecruiterInterestRequest), middleware.permission(roles.PROFESSIONALS), createApplication);","path":"api/v1/controllers/RecruiterInterestController.js","position":null,"original_position":45,"commit_id":"74c849373a7ebaedac059d6caf6ccbf9bffa3150","original_commit_id":"4f66d61f3a6948b2de545f82e0d57c32c6f4af69","user":{"login":"YashoSharma","id":20632446,"avatar_url":"https://avatars1.githubusercontent.com/u/20632446?v=4","gravatar_id":"","url":"https://api.github.com/users/YashoSharma","html_url":"https://github.com/YashoSharma","followers_url":"https://api.github.com/users/YashoSharma/followers","following_url":"https://api.github.com/users/YashoSharma/following{/other_user}","gists_url":"https://api.github.com/users/YashoSharma/gists{/gist_id}","starred_url":"https://api.github.com/users/YashoSharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YashoSharma/subscriptions","organizations_url":"https://api.github.com/users/YashoSharma/orgs","repos_url":"https://api.github.com/users/YashoSharma/repos","events_url":"https://api.github.com/users/YashoSharma/events{/privacy}","received_events_url":"https://api.github.com/users/YashoSharma/received_events","type":"User","site_admin":false},"body":"POST /","created_at":"2018-02-22T04:14:14Z","updated_at":"2018-02-22T04:28:54Z","html_url":"https://github.com/HackIllinois/api/pull/198#discussion_r169851105","pull_request_url":"https://api.github.com/repos/HackIllinois/api/pulls/198","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/comments/169851105"},"html":{"href":"https://github.com/HackIllinois/api/pull/198#discussion_r169851105"},"pull_request":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/198"}}},"pull_request":{"url":"https://api.github.com/repos/HackIllinois/api/pulls/198","id":166898194,"html_url":"https://github.com/HackIllinois/api/pull/198","diff_url":"https://github.com/HackIllinois/api/pull/198.diff","patch_url":"https://github.com/HackIllinois/api/pull/198.patch","issue_url":"https://api.github.com/repos/HackIllinois/api/issues/198","number":198,"state":"open","locked":false,"title":"Create Job Applicant  endpoint for recruiters","user":{"login":"shreychowdhary","id":15990363,"avatar_url":"https://avatars0.githubusercontent.com/u/15990363?v=4","gravatar_id":"","url":"https://api.github.com/users/shreychowdhary","html_url":"https://github.com/shreychowdhary","followers_url":"https://api.github.com/users/shreychowdhary/followers","following_url":"https://api.github.com/users/shreychowdhary/following{/other_user}","gists_url":"https://api.github.com/users/shreychowdhary/gists{/gist_id}","starred_url":"https://api.github.com/users/shreychowdhary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreychowdhary/subscriptions","organizations_url":"https://api.github.com/users/shreychowdhary/orgs","repos_url":"https://api.github.com/users/shreychowdhary/repos","events_url":"https://api.github.com/users/shreychowdhary/events{/privacy}","received_events_url":"https://api.github.com/users/shreychowdhary/received_events","type":"User","site_admin":false},"body":"- [x] Application Table\r\n- [x] Create Applications  \r\n- [x] Get all of recruiters applications","created_at":"2018-02-02T20:39:05Z","updated_at":"2018-02-22T04:28:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c0f9096ca972d10aff5e1749ef2c81a0d99c376","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HackIllinois/api/pulls/198/commits","review_comments_url":"https://api.github.com/repos/HackIllinois/api/pulls/198/comments","review_comment_url":"https://api.github.com/repos/HackIllinois/api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HackIllinois/api/issues/198/comments","statuses_url":"https://api.github.com/repos/HackIllinois/api/statuses/74c849373a7ebaedac059d6caf6ccbf9bffa3150","head":{"label":"HackIllinois:recruiter","ref":"recruiter","sha":"74c849373a7ebaedac059d6caf6ccbf9bffa3150","user":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars0.githubusercontent.com/u/5751098?v=4","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","full_name":"HackIllinois/api","owner":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars0.githubusercontent.com/u/5751098?v=4","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","description":"The back-end services supporting HackIllinois","fork":false,"url":"https://api.github.com/repos/HackIllinois/api","forks_url":"https://api.github.com/repos/HackIllinois/api/forks","keys_url":"https://api.github.com/repos/HackIllinois/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackIllinois/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackIllinois/api/teams","hooks_url":"https://api.github.com/repos/HackIllinois/api/hooks","issue_events_url":"https://api.github.com/repos/HackIllinois/api/issues/events{/number}","events_url":"https://api.github.com/repos/HackIllinois/api/events","assignees_url":"https://api.github.com/repos/HackIllinois/api/assignees{/user}","branches_url":"https://api.github.com/repos/HackIllinois/api/branches{/branch}","tags_url":"https://api.github.com/repos/HackIllinois/api/tags","blobs_url":"https://api.github.com/repos/HackIllinois/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackIllinois/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackIllinois/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackIllinois/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackIllinois/api/statuses/{sha}","languages_url":"https://api.github.com/repos/HackIllinois/api/languages","stargazers_url":"https://api.github.com/repos/HackIllinois/api/stargazers","contributors_url":"https://api.github.com/repos/HackIllinois/api/contributors","subscribers_url":"https://api.github.com/repos/HackIllinois/api/subscribers","subscription_url":"https://api.github.com/repos/HackIllinois/api/subscription","commits_url":"https://api.github.com/repos/HackIllinois/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackIllinois/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackIllinois/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackIllinois/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackIllinois/api/contents/{+path}","compare_url":"https://api.github.com/repos/HackIllinois/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackIllinois/api/merges","archive_url":"https://api.github.com/repos/HackIllinois/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackIllinois/api/downloads","issues_url":"https://api.github.com/repos/HackIllinois/api/issues{/number}","pulls_url":"https://api.github.com/repos/HackIllinois/api/pulls{/number}","milestones_url":"https://api.github.com/repos/HackIllinois/api/milestones{/number}","notifications_url":"https://api.github.com/repos/HackIllinois/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackIllinois/api/labels{/name}","releases_url":"https://api.github.com/repos/HackIllinois/api/releases{/id}","deployments_url":"https://api.github.com/repos/HackIllinois/api/deployments","created_at":"2016-06-12T18:54:33Z","updated_at":"2018-02-22T00:45:12Z","pushed_at":"2018-02-22T04:17:55Z","git_url":"git://github.com/HackIllinois/api.git","ssh_url":"git@github.com:HackIllinois/api.git","clone_url":"https://github.com/HackIllinois/api.git","svn_url":"https://github.com/HackIllinois/api","homepage":"","size":1115,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":13,"open_issues":19,"watchers":13,"default_branch":"master"}},"base":{"label":"HackIllinois:staging","ref":"staging","sha":"f197336aabed855615b3c606caa22fa073ef801a","user":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars0.githubusercontent.com/u/5751098?v=4","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","full_name":"HackIllinois/api","owner":{"login":"HackIllinois","id":5751098,"avatar_url":"https://avatars0.githubusercontent.com/u/5751098?v=4","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","description":"The back-end services supporting HackIllinois","fork":false,"url":"https://api.github.com/repos/HackIllinois/api","forks_url":"https://api.github.com/repos/HackIllinois/api/forks","keys_url":"https://api.github.com/repos/HackIllinois/api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HackIllinois/api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HackIllinois/api/teams","hooks_url":"https://api.github.com/repos/HackIllinois/api/hooks","issue_events_url":"https://api.github.com/repos/HackIllinois/api/issues/events{/number}","events_url":"https://api.github.com/repos/HackIllinois/api/events","assignees_url":"https://api.github.com/repos/HackIllinois/api/assignees{/user}","branches_url":"https://api.github.com/repos/HackIllinois/api/branches{/branch}","tags_url":"https://api.github.com/repos/HackIllinois/api/tags","blobs_url":"https://api.github.com/repos/HackIllinois/api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HackIllinois/api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HackIllinois/api/git/refs{/sha}","trees_url":"https://api.github.com/repos/HackIllinois/api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HackIllinois/api/statuses/{sha}","languages_url":"https://api.github.com/repos/HackIllinois/api/languages","stargazers_url":"https://api.github.com/repos/HackIllinois/api/stargazers","contributors_url":"https://api.github.com/repos/HackIllinois/api/contributors","subscribers_url":"https://api.github.com/repos/HackIllinois/api/subscribers","subscription_url":"https://api.github.com/repos/HackIllinois/api/subscription","commits_url":"https://api.github.com/repos/HackIllinois/api/commits{/sha}","git_commits_url":"https://api.github.com/repos/HackIllinois/api/git/commits{/sha}","comments_url":"https://api.github.com/repos/HackIllinois/api/comments{/number}","issue_comment_url":"https://api.github.com/repos/HackIllinois/api/issues/comments{/number}","contents_url":"https://api.github.com/repos/HackIllinois/api/contents/{+path}","compare_url":"https://api.github.com/repos/HackIllinois/api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HackIllinois/api/merges","archive_url":"https://api.github.com/repos/HackIllinois/api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HackIllinois/api/downloads","issues_url":"https://api.github.com/repos/HackIllinois/api/issues{/number}","pulls_url":"https://api.github.com/repos/HackIllinois/api/pulls{/number}","milestones_url":"https://api.github.com/repos/HackIllinois/api/milestones{/number}","notifications_url":"https://api.github.com/repos/HackIllinois/api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HackIllinois/api/labels{/name}","releases_url":"https://api.github.com/repos/HackIllinois/api/releases{/id}","deployments_url":"https://api.github.com/repos/HackIllinois/api/deployments","created_at":"2016-06-12T18:54:33Z","updated_at":"2018-02-22T00:45:12Z","pushed_at":"2018-02-22T04:17:55Z","git_url":"git://github.com/HackIllinois/api.git","ssh_url":"git@github.com:HackIllinois/api.git","clone_url":"https://github.com/HackIllinois/api.git","svn_url":"https://github.com/HackIllinois/api","homepage":"","size":1115,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":13,"open_issues":19,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/198"},"html":{"href":"https://github.com/HackIllinois/api/pull/198"},"issue":{"href":"https://api.github.com/repos/HackIllinois/api/issues/198"},"comments":{"href":"https://api.github.com/repos/HackIllinois/api/issues/198/comments"},"review_comments":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/198/comments"},"review_comment":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HackIllinois/api/pulls/198/commits"},"statuses":{"href":"https://api.github.com/repos/HackIllinois/api/statuses/74c849373a7ebaedac059d6caf6ccbf9bffa3150"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"YashoSharma"}}