{"action":"created","comment":{"url":"https://api.github.com/repos/jakepeyser/steps/pulls/comments/89346141","pull_request_review_id":9892045,"id":89346141,"diff_hunk":"@@ -79,6 +82,27 @@ router.get('/', (req, res, next) => {\n     .catch(next)\n })\n \n+// Get the patient's current (most recent) plan\n+router.get('/current', (req, res, next) => {\n+  Plan.findOne({\n+    attributes: ['id'],\n+    where: { patient_id: req.patientId },\n+    order: [[sequelize.fn('max', sequelize.col('plan.created_at'))]],","path":"server/routes/plan.js","position":22,"original_position":22,"commit_id":"96b17e19bfa9f2a81d345cd45e9f328d5a800e69","original_commit_id":"96b17e19bfa9f2a81d345cd45e9f328d5a800e69","user":{"login":"mkewls","id":20443136,"avatar_url":"https://avatars.githubusercontent.com/u/20443136?v=3","gravatar_id":"","url":"https://api.github.com/users/mkewls","html_url":"https://github.com/mkewls","followers_url":"https://api.github.com/users/mkewls/followers","following_url":"https://api.github.com/users/mkewls/following{/other_user}","gists_url":"https://api.github.com/users/mkewls/gists{/gist_id}","starred_url":"https://api.github.com/users/mkewls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkewls/subscriptions","organizations_url":"https://api.github.com/users/mkewls/orgs","repos_url":"https://api.github.com/users/mkewls/repos","events_url":"https://api.github.com/users/mkewls/events{/privacy}","received_events_url":"https://api.github.com/users/mkewls/received_events","type":"User","site_admin":false},"body":"neat trick","created_at":"2016-11-23T16:02:15Z","updated_at":"2016-11-23T16:02:15Z","html_url":"https://github.com/jakepeyser/steps/pull/101#discussion_r89346141","pull_request_url":"https://api.github.com/repos/jakepeyser/steps/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/comments/89346141"},"html":{"href":"https://github.com/jakepeyser/steps/pull/101#discussion_r89346141"},"pull_request":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/jakepeyser/steps/pulls/101","id":94948425,"html_url":"https://github.com/jakepeyser/steps/pull/101","diff_url":"https://github.com/jakepeyser/steps/pull/101.diff","patch_url":"https://github.com/jakepeyser/steps/pull/101.patch","issue_url":"https://api.github.com/repos/jakepeyser/steps/issues/101","number":101,"state":"open","locked":false,"title":"Patient plan","user":{"login":"jakepeyser","id":1534503,"avatar_url":"https://avatars.githubusercontent.com/u/1534503?v=3","gravatar_id":"","url":"https://api.github.com/users/jakepeyser","html_url":"https://github.com/jakepeyser","followers_url":"https://api.github.com/users/jakepeyser/followers","following_url":"https://api.github.com/users/jakepeyser/following{/other_user}","gists_url":"https://api.github.com/users/jakepeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/jakepeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakepeyser/subscriptions","organizations_url":"https://api.github.com/users/jakepeyser/orgs","repos_url":"https://api.github.com/users/jakepeyser/repos","events_url":"https://api.github.com/users/jakepeyser/events{/privacy}","received_events_url":"https://api.github.com/users/jakepeyser/received_events","type":"User","site_admin":false},"body":"- Created patient plan page that lists all current workouts and button to initiate uncompleted workouts\r\n- Built route to retrieve a patient's current plan\r\n- Retrieving plan via reducer upon entering path when state does not contain plan","created_at":"2016-11-23T05:52:21Z","updated_at":"2016-11-23T16:02:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02b38e2123891636277287a8ef41110d1895d5c1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jakepeyser/steps/pulls/101/commits","review_comments_url":"https://api.github.com/repos/jakepeyser/steps/pulls/101/comments","review_comment_url":"https://api.github.com/repos/jakepeyser/steps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jakepeyser/steps/issues/101/comments","statuses_url":"https://api.github.com/repos/jakepeyser/steps/statuses/96b17e19bfa9f2a81d345cd45e9f328d5a800e69","head":{"label":"jakepeyser:patient_plan","ref":"patient_plan","sha":"96b17e19bfa9f2a81d345cd45e9f328d5a800e69","user":{"login":"jakepeyser","id":1534503,"avatar_url":"https://avatars.githubusercontent.com/u/1534503?v=3","gravatar_id":"","url":"https://api.github.com/users/jakepeyser","html_url":"https://github.com/jakepeyser","followers_url":"https://api.github.com/users/jakepeyser/followers","following_url":"https://api.github.com/users/jakepeyser/following{/other_user}","gists_url":"https://api.github.com/users/jakepeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/jakepeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakepeyser/subscriptions","organizations_url":"https://api.github.com/users/jakepeyser/orgs","repos_url":"https://api.github.com/users/jakepeyser/repos","events_url":"https://api.github.com/users/jakepeyser/events{/privacy}","received_events_url":"https://api.github.com/users/jakepeyser/received_events","type":"User","site_admin":false},"repo":{"id":73941955,"name":"steps","full_name":"jakepeyser/steps","owner":{"login":"jakepeyser","id":1534503,"avatar_url":"https://avatars.githubusercontent.com/u/1534503?v=3","gravatar_id":"","url":"https://api.github.com/users/jakepeyser","html_url":"https://github.com/jakepeyser","followers_url":"https://api.github.com/users/jakepeyser/followers","following_url":"https://api.github.com/users/jakepeyser/following{/other_user}","gists_url":"https://api.github.com/users/jakepeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/jakepeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakepeyser/subscriptions","organizations_url":"https://api.github.com/users/jakepeyser/orgs","repos_url":"https://api.github.com/users/jakepeyser/repos","events_url":"https://api.github.com/users/jakepeyser/events{/privacy}","received_events_url":"https://api.github.com/users/jakepeyser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakepeyser/steps","description":null,"fork":false,"url":"https://api.github.com/repos/jakepeyser/steps","forks_url":"https://api.github.com/repos/jakepeyser/steps/forks","keys_url":"https://api.github.com/repos/jakepeyser/steps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakepeyser/steps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakepeyser/steps/teams","hooks_url":"https://api.github.com/repos/jakepeyser/steps/hooks","issue_events_url":"https://api.github.com/repos/jakepeyser/steps/issues/events{/number}","events_url":"https://api.github.com/repos/jakepeyser/steps/events","assignees_url":"https://api.github.com/repos/jakepeyser/steps/assignees{/user}","branches_url":"https://api.github.com/repos/jakepeyser/steps/branches{/branch}","tags_url":"https://api.github.com/repos/jakepeyser/steps/tags","blobs_url":"https://api.github.com/repos/jakepeyser/steps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakepeyser/steps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakepeyser/steps/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakepeyser/steps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakepeyser/steps/statuses/{sha}","languages_url":"https://api.github.com/repos/jakepeyser/steps/languages","stargazers_url":"https://api.github.com/repos/jakepeyser/steps/stargazers","contributors_url":"https://api.github.com/repos/jakepeyser/steps/contributors","subscribers_url":"https://api.github.com/repos/jakepeyser/steps/subscribers","subscription_url":"https://api.github.com/repos/jakepeyser/steps/subscription","commits_url":"https://api.github.com/repos/jakepeyser/steps/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakepeyser/steps/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakepeyser/steps/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakepeyser/steps/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakepeyser/steps/contents/{+path}","compare_url":"https://api.github.com/repos/jakepeyser/steps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakepeyser/steps/merges","archive_url":"https://api.github.com/repos/jakepeyser/steps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakepeyser/steps/downloads","issues_url":"https://api.github.com/repos/jakepeyser/steps/issues{/number}","pulls_url":"https://api.github.com/repos/jakepeyser/steps/pulls{/number}","milestones_url":"https://api.github.com/repos/jakepeyser/steps/milestones{/number}","notifications_url":"https://api.github.com/repos/jakepeyser/steps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakepeyser/steps/labels{/name}","releases_url":"https://api.github.com/repos/jakepeyser/steps/releases{/id}","deployments_url":"https://api.github.com/repos/jakepeyser/steps/deployments","created_at":"2016-11-16T17:03:55Z","updated_at":"2016-11-20T03:48:19Z","pushed_at":"2016-11-23T15:57:55Z","git_url":"git://github.com/jakepeyser/steps.git","ssh_url":"git@github.com:jakepeyser/steps.git","clone_url":"https://github.com/jakepeyser/steps.git","svn_url":"https://github.com/jakepeyser/steps","homepage":null,"size":583,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"base":{"label":"jakepeyser:master","ref":"master","sha":"e991410661fe42a45a4bb3d8edcaf5c90bdcef6b","user":{"login":"jakepeyser","id":1534503,"avatar_url":"https://avatars.githubusercontent.com/u/1534503?v=3","gravatar_id":"","url":"https://api.github.com/users/jakepeyser","html_url":"https://github.com/jakepeyser","followers_url":"https://api.github.com/users/jakepeyser/followers","following_url":"https://api.github.com/users/jakepeyser/following{/other_user}","gists_url":"https://api.github.com/users/jakepeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/jakepeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakepeyser/subscriptions","organizations_url":"https://api.github.com/users/jakepeyser/orgs","repos_url":"https://api.github.com/users/jakepeyser/repos","events_url":"https://api.github.com/users/jakepeyser/events{/privacy}","received_events_url":"https://api.github.com/users/jakepeyser/received_events","type":"User","site_admin":false},"repo":{"id":73941955,"name":"steps","full_name":"jakepeyser/steps","owner":{"login":"jakepeyser","id":1534503,"avatar_url":"https://avatars.githubusercontent.com/u/1534503?v=3","gravatar_id":"","url":"https://api.github.com/users/jakepeyser","html_url":"https://github.com/jakepeyser","followers_url":"https://api.github.com/users/jakepeyser/followers","following_url":"https://api.github.com/users/jakepeyser/following{/other_user}","gists_url":"https://api.github.com/users/jakepeyser/gists{/gist_id}","starred_url":"https://api.github.com/users/jakepeyser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakepeyser/subscriptions","organizations_url":"https://api.github.com/users/jakepeyser/orgs","repos_url":"https://api.github.com/users/jakepeyser/repos","events_url":"https://api.github.com/users/jakepeyser/events{/privacy}","received_events_url":"https://api.github.com/users/jakepeyser/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakepeyser/steps","description":null,"fork":false,"url":"https://api.github.com/repos/jakepeyser/steps","forks_url":"https://api.github.com/repos/jakepeyser/steps/forks","keys_url":"https://api.github.com/repos/jakepeyser/steps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakepeyser/steps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakepeyser/steps/teams","hooks_url":"https://api.github.com/repos/jakepeyser/steps/hooks","issue_events_url":"https://api.github.com/repos/jakepeyser/steps/issues/events{/number}","events_url":"https://api.github.com/repos/jakepeyser/steps/events","assignees_url":"https://api.github.com/repos/jakepeyser/steps/assignees{/user}","branches_url":"https://api.github.com/repos/jakepeyser/steps/branches{/branch}","tags_url":"https://api.github.com/repos/jakepeyser/steps/tags","blobs_url":"https://api.github.com/repos/jakepeyser/steps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakepeyser/steps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakepeyser/steps/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakepeyser/steps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakepeyser/steps/statuses/{sha}","languages_url":"https://api.github.com/repos/jakepeyser/steps/languages","stargazers_url":"https://api.github.com/repos/jakepeyser/steps/stargazers","contributors_url":"https://api.github.com/repos/jakepeyser/steps/contributors","subscribers_url":"https://api.github.com/repos/jakepeyser/steps/subscribers","subscription_url":"https://api.github.com/repos/jakepeyser/steps/subscription","commits_url":"https://api.github.com/repos/jakepeyser/steps/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakepeyser/steps/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakepeyser/steps/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakepeyser/steps/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakepeyser/steps/contents/{+path}","compare_url":"https://api.github.com/repos/jakepeyser/steps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakepeyser/steps/merges","archive_url":"https://api.github.com/repos/jakepeyser/steps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakepeyser/steps/downloads","issues_url":"https://api.github.com/repos/jakepeyser/steps/issues{/number}","pulls_url":"https://api.github.com/repos/jakepeyser/steps/pulls{/number}","milestones_url":"https://api.github.com/repos/jakepeyser/steps/milestones{/number}","notifications_url":"https://api.github.com/repos/jakepeyser/steps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakepeyser/steps/labels{/name}","releases_url":"https://api.github.com/repos/jakepeyser/steps/releases{/id}","deployments_url":"https://api.github.com/repos/jakepeyser/steps/deployments","created_at":"2016-11-16T17:03:55Z","updated_at":"2016-11-20T03:48:19Z","pushed_at":"2016-11-23T15:57:55Z","git_url":"git://github.com/jakepeyser/steps.git","ssh_url":"git@github.com:jakepeyser/steps.git","clone_url":"https://github.com/jakepeyser/steps.git","svn_url":"https://github.com/jakepeyser/steps","homepage":null,"size":583,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/101"},"html":{"href":"https://github.com/jakepeyser/steps/pull/101"},"issue":{"href":"https://api.github.com/repos/jakepeyser/steps/issues/101"},"comments":{"href":"https://api.github.com/repos/jakepeyser/steps/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jakepeyser/steps/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/jakepeyser/steps/statuses/96b17e19bfa9f2a81d345cd45e9f328d5a800e69"}}}}
{"actor":{"display_login":"mkewls"}}