{"action":"created","comment":{"url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/comments/341389487","pull_request_review_id":310213197,"id":341389487,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MTM4OTQ4Nw==","diff_hunk":"@@ -177,10 +184,70 @@ private void handleLogout(RoutingContext ctx) {\n     if (!(ctx.session().isEmpty()) && ctx.session().get(\"auth\").equals(1)) {\n       ctx.session().destroy();\n       ctx.reroute(ctx.request().path());\n+    } else {\n+      response.putHeader(\"content-type\", \"text/html\").end(\"<h1>Not Logged In</h1>\");\n     }\n+  }\n+\n+  private void checkAuthentication(RoutingContext ctx) {\n+    HttpServerResponse response = ctx.response();\n+\n+    if (ctx.session().isEmpty() || !ctx.session().get(\"auth\").equals(1)) {\n+      response.putHeader(\"location\", \"/\").setStatusCode(403).end();\n+      return;\n+    }\n+  }\n+\n+  private void handleCreateMeeting(RoutingContext ctx) {\n+    checkAuthentication(ctx);\n+\n+    HttpServerResponse response = ctx.response();\n+    HttpServerRequest request = ctx.request();\n+    String id = \"\";\n+    String name = \"\";\n+    LocalDateTime date = null;\n+    Boolean open = null;\n+    // for now, the input date is to the minute\n+    DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");","path":"api/src/main/java/com/codeforcommunity/rest/ApiRouter.java","position":130,"original_position":130,"commit_id":"e49d0715d76b8b66f2377696d97e92c2d7566769","original_commit_id":"e49d0715d76b8b66f2377696d97e92c2d7566769","user":{"login":"rymaju","id":23691775,"node_id":"MDQ6VXNlcjIzNjkxNzc1","avatar_url":"https://avatars2.githubusercontent.com/u/23691775?v=4","gravatar_id":"","url":"https://api.github.com/users/rymaju","html_url":"https://github.com/rymaju","followers_url":"https://api.github.com/users/rymaju/followers","following_url":"https://api.github.com/users/rymaju/following{/other_user}","gists_url":"https://api.github.com/users/rymaju/gists{/gist_id}","starred_url":"https://api.github.com/users/rymaju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rymaju/subscriptions","organizations_url":"https://api.github.com/users/rymaju/orgs","repos_url":"https://api.github.com/users/rymaju/repos","events_url":"https://api.github.com/users/rymaju/events{/privacy}","received_events_url":"https://api.github.com/users/rymaju/received_events","type":"User","site_admin":false},"body":"I made the decision that the data (likely coming from some form somewhere?) would probably take the meeting time down to the minute at most. Therefore, the formatter will only take dates to the minute.","created_at":"2019-10-31T22:20:25Z","updated_at":"2019-10-31T22:20:25Z","html_url":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5#discussion_r341389487","pull_request_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/comments/341389487"},"html":{"href":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5#discussion_r341389487"},"pull_request":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5","id":335182043,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM1MTgyMDQz","html_url":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5","diff_url":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5.diff","patch_url":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5.patch","issue_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/5","number":5,"state":"open","locked":false,"title":"Ryan jung 9 checkin api calls","user":{"login":"rymaju","id":23691775,"node_id":"MDQ6VXNlcjIzNjkxNzc1","avatar_url":"https://avatars2.githubusercontent.com/u/23691775?v=4","gravatar_id":"","url":"https://api.github.com/users/rymaju","html_url":"https://github.com/rymaju","followers_url":"https://api.github.com/users/rymaju/followers","following_url":"https://api.github.com/users/rymaju/following{/other_user}","gists_url":"https://api.github.com/users/rymaju/gists{/gist_id}","starred_url":"https://api.github.com/users/rymaju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rymaju/subscriptions","organizations_url":"https://api.github.com/users/rymaju/orgs","repos_url":"https://api.github.com/users/rymaju/repos","events_url":"https://api.github.com/users/rymaju/events{/privacy}","received_events_url":"https://api.github.com/users/rymaju/received_events","type":"User","site_admin":false},"body":"Created two more routes:\r\n\r\nGET https://localhost:8443/protected/attendmeeting?id\r\n- id represents the id of the meeting that the user is trying to attend\r\n\r\nThe meeting date must be sometime in the future and the meeting must be open to be attended.\r\nFor now, the primary key is the hashcode of the meeting id and member id.\r\n\r\nGET https://localhost:8443/protected/createmeeting?id&name&date&open\r\n- id represents the meeting id, must be a unique value as it is the primary key\r\n- name represents the name of the meeting as a String\r\n- date represents a date of format \"yyyy-MM-dd HH:mm\", the date MUST be in this format.\r\n- open represents a boolean true/false for whether the meeting is open or closed.\r\n\r\nBoth routes will return a 403 forbidden error if the user is not logged in (checks the session)\r\n\r\n_Note that as both of these create a record in the database, these should really be POST requests. However GET requests were specified in the ticket._\r\n\r\nInsomnia Screenshots: (assuming there is already a member Ryan Jung)\r\n![image](https://user-images.githubusercontent.com/23691775/67988792-628eb100-fc07-11e9-960a-6b1cc109eaa1.png)\r\n\r\n![image](https://user-images.githubusercontent.com/23691775/67988978-e183e980-fc07-11e9-816b-0c2144e00e6f.png)\r\n\r\n![image](https://user-images.githubusercontent.com/23691775/67988955-d29d3700-fc07-11e9-9cf2-b8daa7fd7b7c.png)\r\n\r\nPostgresSQL database screenshots: (records crossed out in red are not relevant)\r\n\r\n![image](https://user-images.githubusercontent.com/23691775/67989263-a33afa00-fc08-11e9-93fc-621fd0955125.png)\r\n\r\n![image](https://user-images.githubusercontent.com/23691775/67989233-8f8f9380-fc08-11e9-88c1-db7e501900aa.png)\r\n\r\nLast note: There are configuration changes for my specific computer at:\r\n- ApiMain.java lines 29 and 42 to use the local keystores\r\n- persist/pom.xml line 17 to use database at localhost:5432 instead of localhost:5434\r\n- serviceMain.java line 37 to use database at localhost:5432 instead of localhost:5434\r\n","created_at":"2019-10-31T22:13:06Z","updated_at":"2019-10-31T22:20:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51ffaf335c9f9f6aed304a0520159f650c624b6e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/5/comments","statuses_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/statuses/e49d0715d76b8b66f2377696d97e92c2d7566769","head":{"label":"Code-4-Community:RyanJung_9_CheckinAPICalls","ref":"RyanJung_9_CheckinAPICalls","sha":"e49d0715d76b8b66f2377696d97e92c2d7566769","user":{"login":"Code-4-Community","id":55949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1OTQ5ODAx","avatar_url":"https://avatars0.githubusercontent.com/u/55949801?v=4","gravatar_id":"","url":"https://api.github.com/users/Code-4-Community","html_url":"https://github.com/Code-4-Community","followers_url":"https://api.github.com/users/Code-4-Community/followers","following_url":"https://api.github.com/users/Code-4-Community/following{/other_user}","gists_url":"https://api.github.com/users/Code-4-Community/gists{/gist_id}","starred_url":"https://api.github.com/users/Code-4-Community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code-4-Community/subscriptions","organizations_url":"https://api.github.com/users/Code-4-Community/orgs","repos_url":"https://api.github.com/users/Code-4-Community/repos","events_url":"https://api.github.com/users/Code-4-Community/events{/privacy}","received_events_url":"https://api.github.com/users/Code-4-Community/received_events","type":"Organization","site_admin":false},"repo":{"id":215133674,"node_id":"MDEwOlJlcG9zaXRvcnkyMTUxMzM2NzQ=","name":"c4c-internal-backend","full_name":"Code-4-Community/c4c-internal-backend","private":false,"owner":{"login":"Code-4-Community","id":55949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1OTQ5ODAx","avatar_url":"https://avatars0.githubusercontent.com/u/55949801?v=4","gravatar_id":"","url":"https://api.github.com/users/Code-4-Community","html_url":"https://github.com/Code-4-Community","followers_url":"https://api.github.com/users/Code-4-Community/followers","following_url":"https://api.github.com/users/Code-4-Community/following{/other_user}","gists_url":"https://api.github.com/users/Code-4-Community/gists{/gist_id}","starred_url":"https://api.github.com/users/Code-4-Community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code-4-Community/subscriptions","organizations_url":"https://api.github.com/users/Code-4-Community/orgs","repos_url":"https://api.github.com/users/Code-4-Community/repos","events_url":"https://api.github.com/users/Code-4-Community/events{/privacy}","received_events_url":"https://api.github.com/users/Code-4-Community/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Code-4-Community/c4c-internal-backend","description":null,"fork":false,"url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend","forks_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/forks","keys_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/teams","hooks_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/hooks","issue_events_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/events","assignees_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/tags","blobs_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/languages","stargazers_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/stargazers","contributors_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/contributors","subscribers_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/subscribers","subscription_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/subscription","commits_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/merges","archive_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/downloads","issues_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/labels{/name}","releases_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/deployments","created_at":"2019-10-14T19:57:03Z","updated_at":"2019-10-30T01:56:49Z","pushed_at":"2019-10-31T22:13:07Z","git_url":"git://github.com/Code-4-Community/c4c-internal-backend.git","ssh_url":"git@github.com:Code-4-Community/c4c-internal-backend.git","clone_url":"https://github.com/Code-4-Community/c4c-internal-backend.git","svn_url":"https://github.com/Code-4-Community/c4c-internal-backend","homepage":null,"size":101,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Code-4-Community:master","ref":"master","sha":"f193e1c087e96d7768dfdbea4cc0097cd71eddb8","user":{"login":"Code-4-Community","id":55949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1OTQ5ODAx","avatar_url":"https://avatars0.githubusercontent.com/u/55949801?v=4","gravatar_id":"","url":"https://api.github.com/users/Code-4-Community","html_url":"https://github.com/Code-4-Community","followers_url":"https://api.github.com/users/Code-4-Community/followers","following_url":"https://api.github.com/users/Code-4-Community/following{/other_user}","gists_url":"https://api.github.com/users/Code-4-Community/gists{/gist_id}","starred_url":"https://api.github.com/users/Code-4-Community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code-4-Community/subscriptions","organizations_url":"https://api.github.com/users/Code-4-Community/orgs","repos_url":"https://api.github.com/users/Code-4-Community/repos","events_url":"https://api.github.com/users/Code-4-Community/events{/privacy}","received_events_url":"https://api.github.com/users/Code-4-Community/received_events","type":"Organization","site_admin":false},"repo":{"id":215133674,"node_id":"MDEwOlJlcG9zaXRvcnkyMTUxMzM2NzQ=","name":"c4c-internal-backend","full_name":"Code-4-Community/c4c-internal-backend","private":false,"owner":{"login":"Code-4-Community","id":55949801,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1OTQ5ODAx","avatar_url":"https://avatars0.githubusercontent.com/u/55949801?v=4","gravatar_id":"","url":"https://api.github.com/users/Code-4-Community","html_url":"https://github.com/Code-4-Community","followers_url":"https://api.github.com/users/Code-4-Community/followers","following_url":"https://api.github.com/users/Code-4-Community/following{/other_user}","gists_url":"https://api.github.com/users/Code-4-Community/gists{/gist_id}","starred_url":"https://api.github.com/users/Code-4-Community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Code-4-Community/subscriptions","organizations_url":"https://api.github.com/users/Code-4-Community/orgs","repos_url":"https://api.github.com/users/Code-4-Community/repos","events_url":"https://api.github.com/users/Code-4-Community/events{/privacy}","received_events_url":"https://api.github.com/users/Code-4-Community/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Code-4-Community/c4c-internal-backend","description":null,"fork":false,"url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend","forks_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/forks","keys_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/teams","hooks_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/hooks","issue_events_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/events","assignees_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/tags","blobs_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/languages","stargazers_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/stargazers","contributors_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/contributors","subscribers_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/subscribers","subscription_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/subscription","commits_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/merges","archive_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/downloads","issues_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/labels{/name}","releases_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/deployments","created_at":"2019-10-14T19:57:03Z","updated_at":"2019-10-30T01:56:49Z","pushed_at":"2019-10-31T22:13:07Z","git_url":"git://github.com/Code-4-Community/c4c-internal-backend.git","ssh_url":"git@github.com:Code-4-Community/c4c-internal-backend.git","clone_url":"https://github.com/Code-4-Community/c4c-internal-backend.git","svn_url":"https://github.com/Code-4-Community/c4c-internal-backend","homepage":null,"size":101,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5"},"html":{"href":"https://github.com/Code-4-Community/c4c-internal-backend/pull/5"},"issue":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/5"},"comments":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Code-4-Community/c4c-internal-backend/statuses/e49d0715d76b8b66f2377696d97e92c2d7566769"}},"author_association":"NONE"}}
{"actor":{"display_login":"rymaju"}}