{"action":"created","comment":{"url":"https://api.github.com/repos/rcos/observatory-server/pulls/comments/231297303","pull_request_review_id":172238408,"id":231297303,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTI5NzMwMw==","diff_hunk":"@@ -3,11 +3,42 @@ const controller = require('./excused_absence.controller')\n const auth = require('../../auth/auth.service')\n const router = express.Router()\n \n+// GET /api/excused_absences\n router.get('/', auth.isAuthenticated(), controller.index)\n+\n+// GET /api/excused_absences/admin\n router.get('/admin', auth.hasRole('admin'), controller.admin)\n-router.get('/:id', auth.isAuthenticated(), controller.show)\n+\n+// POST /api/excused_absences\n router.post('/', auth.isAuthenticated(), controller.create)\n-router.put('/:id', auth.hasRole('admin'), controller.update)\n+\n+// PUT /api/excused_absences/:id\n+router.put('/:id', auth.isAuthenticated(), controller.update)\n+\n+// Admin-only PUTs\n+// PUT /api/excused_absences/:id\n+router.put('/:id/approve', auth.hasRole('admin'), controller.update)\n+router.put('/:id/deny', auth.hasRole('admin'), controller.update)\n+\n router.delete('/:id', auth.isAuthenticated(), controller.destroy)\n \n module.exports = router\n+\n+\n+// User","path":"server/api/excused_absence/index.js","position":28,"original_position":28,"commit_id":"10f7460f1adbabe65a761362861a3b7c7145b2a6","original_commit_id":"10f7460f1adbabe65a761362861a3b7c7145b2a6","user":{"login":"agundy","id":2281120,"node_id":"MDQ6VXNlcjIyODExMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/2281120?v=4","gravatar_id":"","url":"https://api.github.com/users/agundy","html_url":"https://github.com/agundy","followers_url":"https://api.github.com/users/agundy/followers","following_url":"https://api.github.com/users/agundy/following{/other_user}","gists_url":"https://api.github.com/users/agundy/gists{/gist_id}","starred_url":"https://api.github.com/users/agundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agundy/subscriptions","organizations_url":"https://api.github.com/users/agundy/orgs","repos_url":"https://api.github.com/users/agundy/repos","events_url":"https://api.github.com/users/agundy/events{/privacy}","received_events_url":"https://api.github.com/users/agundy/received_events","type":"User","site_admin":false},"body":"This doesn't seem to be the right place for a to-do list long term. Can you remove before merging?","created_at":"2018-11-06T21:21:22Z","updated_at":"2018-11-06T21:21:22Z","html_url":"https://github.com/rcos/observatory-server/pull/801#discussion_r231297303","pull_request_url":"https://api.github.com/repos/rcos/observatory-server/pulls/801","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/comments/231297303"},"html":{"href":"https://github.com/rcos/observatory-server/pull/801#discussion_r231297303"},"pull_request":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/801"}}},"pull_request":{"url":"https://api.github.com/repos/rcos/observatory-server/pulls/801","id":228206683,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MjA2Njgz","html_url":"https://github.com/rcos/observatory-server/pull/801","diff_url":"https://github.com/rcos/observatory-server/pull/801.diff","patch_url":"https://github.com/rcos/observatory-server/pull/801.patch","issue_url":"https://api.github.com/repos/rcos/observatory-server/issues/801","number":801,"state":"open","locked":false,"title":"Excused Absence deletion implementation","user":{"login":"off-by-1-error","id":27707569,"node_id":"MDQ6VXNlcjI3NzA3NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/27707569?v=4","gravatar_id":"","url":"https://api.github.com/users/off-by-1-error","html_url":"https://github.com/off-by-1-error","followers_url":"https://api.github.com/users/off-by-1-error/followers","following_url":"https://api.github.com/users/off-by-1-error/following{/other_user}","gists_url":"https://api.github.com/users/off-by-1-error/gists{/gist_id}","starred_url":"https://api.github.com/users/off-by-1-error/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/off-by-1-error/subscriptions","organizations_url":"https://api.github.com/users/off-by-1-error/orgs","repos_url":"https://api.github.com/users/off-by-1-error/repos","events_url":"https://api.github.com/users/off-by-1-error/events{/privacy}","received_events_url":"https://api.github.com/users/off-by-1-error/received_events","type":"User","site_admin":false},"body":"in the destroy function, I added checks to verify that if you're not an admin, you can only destroy your own excused absences. Admins can still delete any excused absence\r\n\r\nI also documented the approve function","created_at":"2018-11-04T22:11:41Z","updated_at":"2018-11-06T21:21:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c66bca8b99ccc97939d9e4b59eda80db9e60757d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rcos/observatory-server/pulls/801/commits","review_comments_url":"https://api.github.com/repos/rcos/observatory-server/pulls/801/comments","review_comment_url":"https://api.github.com/repos/rcos/observatory-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rcos/observatory-server/issues/801/comments","statuses_url":"https://api.github.com/repos/rcos/observatory-server/statuses/10f7460f1adbabe65a761362861a3b7c7145b2a6","head":{"label":"off-by-1-error:dev","ref":"dev","sha":"10f7460f1adbabe65a761362861a3b7c7145b2a6","user":{"login":"off-by-1-error","id":27707569,"node_id":"MDQ6VXNlcjI3NzA3NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/27707569?v=4","gravatar_id":"","url":"https://api.github.com/users/off-by-1-error","html_url":"https://github.com/off-by-1-error","followers_url":"https://api.github.com/users/off-by-1-error/followers","following_url":"https://api.github.com/users/off-by-1-error/following{/other_user}","gists_url":"https://api.github.com/users/off-by-1-error/gists{/gist_id}","starred_url":"https://api.github.com/users/off-by-1-error/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/off-by-1-error/subscriptions","organizations_url":"https://api.github.com/users/off-by-1-error/orgs","repos_url":"https://api.github.com/users/off-by-1-error/repos","events_url":"https://api.github.com/users/off-by-1-error/events{/privacy}","received_events_url":"https://api.github.com/users/off-by-1-error/received_events","type":"User","site_admin":false},"repo":{"id":148377939,"node_id":"MDEwOlJlcG9zaXRvcnkxNDgzNzc5Mzk=","name":"observatory-server","full_name":"off-by-1-error/observatory-server","private":false,"owner":{"login":"off-by-1-error","id":27707569,"node_id":"MDQ6VXNlcjI3NzA3NTY5","avatar_url":"https://avatars3.githubusercontent.com/u/27707569?v=4","gravatar_id":"","url":"https://api.github.com/users/off-by-1-error","html_url":"https://github.com/off-by-1-error","followers_url":"https://api.github.com/users/off-by-1-error/followers","following_url":"https://api.github.com/users/off-by-1-error/following{/other_user}","gists_url":"https://api.github.com/users/off-by-1-error/gists{/gist_id}","starred_url":"https://api.github.com/users/off-by-1-error/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/off-by-1-error/subscriptions","organizations_url":"https://api.github.com/users/off-by-1-error/orgs","repos_url":"https://api.github.com/users/off-by-1-error/repos","events_url":"https://api.github.com/users/off-by-1-error/events{/privacy}","received_events_url":"https://api.github.com/users/off-by-1-error/received_events","type":"User","site_admin":false},"html_url":"https://github.com/off-by-1-error/observatory-server","description":"A project tracking dashboard for Rensselaer Center for Open Source","fork":true,"url":"https://api.github.com/repos/off-by-1-error/observatory-server","forks_url":"https://api.github.com/repos/off-by-1-error/observatory-server/forks","keys_url":"https://api.github.com/repos/off-by-1-error/observatory-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/off-by-1-error/observatory-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/off-by-1-error/observatory-server/teams","hooks_url":"https://api.github.com/repos/off-by-1-error/observatory-server/hooks","issue_events_url":"https://api.github.com/repos/off-by-1-error/observatory-server/issues/events{/number}","events_url":"https://api.github.com/repos/off-by-1-error/observatory-server/events","assignees_url":"https://api.github.com/repos/off-by-1-error/observatory-server/assignees{/user}","branches_url":"https://api.github.com/repos/off-by-1-error/observatory-server/branches{/branch}","tags_url":"https://api.github.com/repos/off-by-1-error/observatory-server/tags","blobs_url":"https://api.github.com/repos/off-by-1-error/observatory-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/off-by-1-error/observatory-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/off-by-1-error/observatory-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/off-by-1-error/observatory-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/off-by-1-error/observatory-server/statuses/{sha}","languages_url":"https://api.github.com/repos/off-by-1-error/observatory-server/languages","stargazers_url":"https://api.github.com/repos/off-by-1-error/observatory-server/stargazers","contributors_url":"https://api.github.com/repos/off-by-1-error/observatory-server/contributors","subscribers_url":"https://api.github.com/repos/off-by-1-error/observatory-server/subscribers","subscription_url":"https://api.github.com/repos/off-by-1-error/observatory-server/subscription","commits_url":"https://api.github.com/repos/off-by-1-error/observatory-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/off-by-1-error/observatory-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/off-by-1-error/observatory-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/off-by-1-error/observatory-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/off-by-1-error/observatory-server/contents/{+path}","compare_url":"https://api.github.com/repos/off-by-1-error/observatory-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/off-by-1-error/observatory-server/merges","archive_url":"https://api.github.com/repos/off-by-1-error/observatory-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/off-by-1-error/observatory-server/downloads","issues_url":"https://api.github.com/repos/off-by-1-error/observatory-server/issues{/number}","pulls_url":"https://api.github.com/repos/off-by-1-error/observatory-server/pulls{/number}","milestones_url":"https://api.github.com/repos/off-by-1-error/observatory-server/milestones{/number}","notifications_url":"https://api.github.com/repos/off-by-1-error/observatory-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/off-by-1-error/observatory-server/labels{/name}","releases_url":"https://api.github.com/repos/off-by-1-error/observatory-server/releases{/id}","deployments_url":"https://api.github.com/repos/off-by-1-error/observatory-server/deployments","created_at":"2018-09-11T20:44:23Z","updated_at":"2018-10-02T20:37:00Z","pushed_at":"2018-11-06T21:04:11Z","git_url":"git://github.com/off-by-1-error/observatory-server.git","ssh_url":"git@github.com:off-by-1-error/observatory-server.git","clone_url":"https://github.com/off-by-1-error/observatory-server.git","svn_url":"https://github.com/off-by-1-error/observatory-server","homepage":"https://rcos.io","size":6384,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rcos:dev","ref":"dev","sha":"58ae31f6bf957c2714c5d427ab9fe9539e6b6840","user":{"login":"rcos","id":778001,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3ODAwMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/778001?v=4","gravatar_id":"","url":"https://api.github.com/users/rcos","html_url":"https://github.com/rcos","followers_url":"https://api.github.com/users/rcos/followers","following_url":"https://api.github.com/users/rcos/following{/other_user}","gists_url":"https://api.github.com/users/rcos/gists{/gist_id}","starred_url":"https://api.github.com/users/rcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcos/subscriptions","organizations_url":"https://api.github.com/users/rcos/orgs","repos_url":"https://api.github.com/users/rcos/repos","events_url":"https://api.github.com/users/rcos/events{/privacy}","received_events_url":"https://api.github.com/users/rcos/received_events","type":"Organization","site_admin":false},"repo":{"id":27746341,"node_id":"MDEwOlJlcG9zaXRvcnkyNzc0NjM0MQ==","name":"observatory-server","full_name":"rcos/observatory-server","private":false,"owner":{"login":"rcos","id":778001,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc3ODAwMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/778001?v=4","gravatar_id":"","url":"https://api.github.com/users/rcos","html_url":"https://github.com/rcos","followers_url":"https://api.github.com/users/rcos/followers","following_url":"https://api.github.com/users/rcos/following{/other_user}","gists_url":"https://api.github.com/users/rcos/gists{/gist_id}","starred_url":"https://api.github.com/users/rcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcos/subscriptions","organizations_url":"https://api.github.com/users/rcos/orgs","repos_url":"https://api.github.com/users/rcos/repos","events_url":"https://api.github.com/users/rcos/events{/privacy}","received_events_url":"https://api.github.com/users/rcos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rcos/observatory-server","description":"A project tracking dashboard for Rensselaer Center for Open Source","fork":false,"url":"https://api.github.com/repos/rcos/observatory-server","forks_url":"https://api.github.com/repos/rcos/observatory-server/forks","keys_url":"https://api.github.com/repos/rcos/observatory-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcos/observatory-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcos/observatory-server/teams","hooks_url":"https://api.github.com/repos/rcos/observatory-server/hooks","issue_events_url":"https://api.github.com/repos/rcos/observatory-server/issues/events{/number}","events_url":"https://api.github.com/repos/rcos/observatory-server/events","assignees_url":"https://api.github.com/repos/rcos/observatory-server/assignees{/user}","branches_url":"https://api.github.com/repos/rcos/observatory-server/branches{/branch}","tags_url":"https://api.github.com/repos/rcos/observatory-server/tags","blobs_url":"https://api.github.com/repos/rcos/observatory-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcos/observatory-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcos/observatory-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcos/observatory-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcos/observatory-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rcos/observatory-server/languages","stargazers_url":"https://api.github.com/repos/rcos/observatory-server/stargazers","contributors_url":"https://api.github.com/repos/rcos/observatory-server/contributors","subscribers_url":"https://api.github.com/repos/rcos/observatory-server/subscribers","subscription_url":"https://api.github.com/repos/rcos/observatory-server/subscription","commits_url":"https://api.github.com/repos/rcos/observatory-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcos/observatory-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcos/observatory-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcos/observatory-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcos/observatory-server/contents/{+path}","compare_url":"https://api.github.com/repos/rcos/observatory-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcos/observatory-server/merges","archive_url":"https://api.github.com/repos/rcos/observatory-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcos/observatory-server/downloads","issues_url":"https://api.github.com/repos/rcos/observatory-server/issues{/number}","pulls_url":"https://api.github.com/repos/rcos/observatory-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rcos/observatory-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rcos/observatory-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcos/observatory-server/labels{/name}","releases_url":"https://api.github.com/repos/rcos/observatory-server/releases{/id}","deployments_url":"https://api.github.com/repos/rcos/observatory-server/deployments","created_at":"2014-12-09T02:45:33Z","updated_at":"2018-10-19T16:46:49Z","pushed_at":"2018-11-06T21:04:12Z","git_url":"git://github.com/rcos/observatory-server.git","ssh_url":"git@github.com:rcos/observatory-server.git","clone_url":"https://github.com/rcos/observatory-server.git","svn_url":"https://github.com/rcos/observatory-server","homepage":"https://rcos.io","size":6660,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":115,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":53,"open_issues":115,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/801"},"html":{"href":"https://github.com/rcos/observatory-server/pull/801"},"issue":{"href":"https://api.github.com/repos/rcos/observatory-server/issues/801"},"comments":{"href":"https://api.github.com/repos/rcos/observatory-server/issues/801/comments"},"review_comments":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/801/comments"},"review_comment":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rcos/observatory-server/pulls/801/commits"},"statuses":{"href":"https://api.github.com/repos/rcos/observatory-server/statuses/10f7460f1adbabe65a761362861a3b7c7145b2a6"}},"author_association":"NONE"}}
{"actor":{"display_login":"agundy"}}