{"action":"created","comment":{"url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/comments/61090772","id":61090772,"diff_hunk":"@@ -1,8 +1,159 @@\n package com.theironyard.clt;\n \n+import spark.ModelAndView;\n+import spark.Session;\n+import spark.Spark;\n+import spark.template.mustache.MustacheTemplateEngine;\n+\n+import java.sql.*;\n+import java.util.HashMap;\n+\n public class Main {\n \n-    public static void main(String[] args) {\n-\t// write your code here\n+    public static HashMap<String, User> users = new HashMap<>();\n+\n+    public static void main(String[] args) throws SQLException {\n+        Spark.init();\n+\n+        Spark.post(\"/destroy-user\", (request, response) -> {\n+            Session session = request.session();\n+\n+            session.invalidate();\n+\n+            response.redirect(\"/\");\n+            return \"\";\n+        });\n+\n+        Spark.post(\"/delete-message\", (request, response) -> {\n+            Session session = request.session();\n+\n+            if (session.attribute(\"userName\") == null) {\n+                response.redirect(\"/\");\n+                return \"\";\n+            }\n+\n+            int messageNumber = Integer.valueOf(request.queryParams(\"messageNum\"));\n+            User currentUser = users.get(session.attribute(\"userName\"));","path":"src/com/theironyard/clt/Main.java","position":38,"original_position":38,"commit_id":"45ad507e1a1afe9cba21ab811b7248e6e5eb6bd1","original_commit_id":"45ad507e1a1afe9cba21ab811b7248e6e5eb6bd1","user":{"login":"raynjamin","id":426472,"avatar_url":"https://avatars.githubusercontent.com/u/426472?v=3","gravatar_id":"","url":"https://api.github.com/users/raynjamin","html_url":"https://github.com/raynjamin","followers_url":"https://api.github.com/users/raynjamin/followers","following_url":"https://api.github.com/users/raynjamin/following{/other_user}","gists_url":"https://api.github.com/users/raynjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/raynjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raynjamin/subscriptions","organizations_url":"https://api.github.com/users/raynjamin/orgs","repos_url":"https://api.github.com/users/raynjamin/repos","events_url":"https://api.github.com/users/raynjamin/events{/privacy}","received_events_url":"https://api.github.com/users/raynjamin/received_events","type":"User","site_admin":false},"body":"We aren't getting our currentUser from our hashmap anymore, it should be from a call to our DataLog.getUser() method.","created_at":"2016-04-26T14:04:00Z","updated_at":"2016-04-26T14:04:00Z","html_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1#discussion_r61090772","pull_request_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/comments/61090772"},"html":{"href":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1#discussion_r61090772"},"pull_request":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1","id":67800729,"html_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1","diff_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1.diff","patch_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1.patch","issue_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/1","number":1,"state":"open","locked":false,"title":"finally","user":{"login":"zombieApoc","id":17968338,"avatar_url":"https://avatars.githubusercontent.com/u/17968338?v=3","gravatar_id":"","url":"https://api.github.com/users/zombieApoc","html_url":"https://github.com/zombieApoc","followers_url":"https://api.github.com/users/zombieApoc/followers","following_url":"https://api.github.com/users/zombieApoc/following{/other_user}","gists_url":"https://api.github.com/users/zombieApoc/gists{/gist_id}","starred_url":"https://api.github.com/users/zombieApoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zombieApoc/subscriptions","organizations_url":"https://api.github.com/users/zombieApoc/orgs","repos_url":"https://api.github.com/users/zombieApoc/repos","events_url":"https://api.github.com/users/zombieApoc/events{/privacy}","received_events_url":"https://api.github.com/users/zombieApoc/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-25T22:43:34Z","updated_at":"2016-04-26T14:04:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3f9723ac1a64f96272d30035a26ad56ff3dd1f05","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1/commits","review_comments_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1/comments","review_comment_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/1/comments","statuses_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/statuses/45ad507e1a1afe9cba21ab811b7248e6e5eb6bd1","head":{"label":"zombieApoc:master","ref":"master","sha":"45ad507e1a1afe9cba21ab811b7248e6e5eb6bd1","user":{"login":"zombieApoc","id":17968338,"avatar_url":"https://avatars.githubusercontent.com/u/17968338?v=3","gravatar_id":"","url":"https://api.github.com/users/zombieApoc","html_url":"https://github.com/zombieApoc","followers_url":"https://api.github.com/users/zombieApoc/followers","following_url":"https://api.github.com/users/zombieApoc/following{/other_user}","gists_url":"https://api.github.com/users/zombieApoc/gists{/gist_id}","starred_url":"https://api.github.com/users/zombieApoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zombieApoc/subscriptions","organizations_url":"https://api.github.com/users/zombieApoc/orgs","repos_url":"https://api.github.com/users/zombieApoc/repos","events_url":"https://api.github.com/users/zombieApoc/events{/privacy}","received_events_url":"https://api.github.com/users/zombieApoc/received_events","type":"User","site_admin":false},"repo":{"id":56874003,"name":"Microblog-Registration","full_name":"zombieApoc/Microblog-Registration","owner":{"login":"zombieApoc","id":17968338,"avatar_url":"https://avatars.githubusercontent.com/u/17968338?v=3","gravatar_id":"","url":"https://api.github.com/users/zombieApoc","html_url":"https://github.com/zombieApoc","followers_url":"https://api.github.com/users/zombieApoc/followers","following_url":"https://api.github.com/users/zombieApoc/following{/other_user}","gists_url":"https://api.github.com/users/zombieApoc/gists{/gist_id}","starred_url":"https://api.github.com/users/zombieApoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zombieApoc/subscriptions","organizations_url":"https://api.github.com/users/zombieApoc/orgs","repos_url":"https://api.github.com/users/zombieApoc/repos","events_url":"https://api.github.com/users/zombieApoc/events{/privacy}","received_events_url":"https://api.github.com/users/zombieApoc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zombieApoc/Microblog-Registration","description":"We're getting more advanced with our microblog now","fork":true,"url":"https://api.github.com/repos/zombieApoc/Microblog-Registration","forks_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/forks","keys_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/teams","hooks_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/hooks","issue_events_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/issues/events{/number}","events_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/events","assignees_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/assignees{/user}","branches_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/branches{/branch}","tags_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/tags","blobs_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/statuses/{sha}","languages_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/languages","stargazers_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/stargazers","contributors_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/contributors","subscribers_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/subscribers","subscription_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/subscription","commits_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/contents/{+path}","compare_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/merges","archive_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/downloads","issues_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/issues{/number}","pulls_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/pulls{/number}","milestones_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/milestones{/number}","notifications_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/labels{/name}","releases_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/releases{/id}","deployments_url":"https://api.github.com/repos/zombieApoc/Microblog-Registration/deployments","created_at":"2016-04-22T17:37:40Z","updated_at":"2016-04-22T17:37:41Z","pushed_at":"2016-04-25T22:42:59Z","git_url":"git://github.com/zombieApoc/Microblog-Registration.git","ssh_url":"git@github.com:zombieApoc/Microblog-Registration.git","clone_url":"https://github.com/zombieApoc/Microblog-Registration.git","svn_url":"https://github.com/zombieApoc/Microblog-Registration","homepage":null,"size":1663,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TIY-Charlotte-Java:master","ref":"master","sha":"a7cd67ba305c367bef7837e7d3da9092c8945f3e","user":{"login":"TIY-Charlotte-Java","id":17955174,"avatar_url":"https://avatars.githubusercontent.com/u/17955174?v=3","gravatar_id":"","url":"https://api.github.com/users/TIY-Charlotte-Java","html_url":"https://github.com/TIY-Charlotte-Java","followers_url":"https://api.github.com/users/TIY-Charlotte-Java/followers","following_url":"https://api.github.com/users/TIY-Charlotte-Java/following{/other_user}","gists_url":"https://api.github.com/users/TIY-Charlotte-Java/gists{/gist_id}","starred_url":"https://api.github.com/users/TIY-Charlotte-Java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TIY-Charlotte-Java/subscriptions","organizations_url":"https://api.github.com/users/TIY-Charlotte-Java/orgs","repos_url":"https://api.github.com/users/TIY-Charlotte-Java/repos","events_url":"https://api.github.com/users/TIY-Charlotte-Java/events{/privacy}","received_events_url":"https://api.github.com/users/TIY-Charlotte-Java/received_events","type":"Organization","site_admin":false},"repo":{"id":56786851,"name":"Microblog-Registration","full_name":"TIY-Charlotte-Java/Microblog-Registration","owner":{"login":"TIY-Charlotte-Java","id":17955174,"avatar_url":"https://avatars.githubusercontent.com/u/17955174?v=3","gravatar_id":"","url":"https://api.github.com/users/TIY-Charlotte-Java","html_url":"https://github.com/TIY-Charlotte-Java","followers_url":"https://api.github.com/users/TIY-Charlotte-Java/followers","following_url":"https://api.github.com/users/TIY-Charlotte-Java/following{/other_user}","gists_url":"https://api.github.com/users/TIY-Charlotte-Java/gists{/gist_id}","starred_url":"https://api.github.com/users/TIY-Charlotte-Java/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TIY-Charlotte-Java/subscriptions","organizations_url":"https://api.github.com/users/TIY-Charlotte-Java/orgs","repos_url":"https://api.github.com/users/TIY-Charlotte-Java/repos","events_url":"https://api.github.com/users/TIY-Charlotte-Java/events{/privacy}","received_events_url":"https://api.github.com/users/TIY-Charlotte-Java/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration","description":"We're getting more advanced with our microblog now","fork":false,"url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration","forks_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/forks","keys_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/teams","hooks_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/hooks","issue_events_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/events{/number}","events_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/events","assignees_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/assignees{/user}","branches_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/branches{/branch}","tags_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/tags","blobs_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/git/refs{/sha}","trees_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/statuses/{sha}","languages_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/languages","stargazers_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/stargazers","contributors_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/contributors","subscribers_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/subscribers","subscription_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/subscription","commits_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/commits{/sha}","git_commits_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/git/commits{/sha}","comments_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/comments{/number}","issue_comment_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/comments{/number}","contents_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/contents/{+path}","compare_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/merges","archive_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/downloads","issues_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues{/number}","pulls_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls{/number}","milestones_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/milestones{/number}","notifications_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/labels{/name}","releases_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/releases{/id}","deployments_url":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/deployments","created_at":"2016-04-21T15:51:05Z","updated_at":"2016-04-22T17:23:54Z","pushed_at":"2016-04-25T22:43:35Z","git_url":"git://github.com/TIY-Charlotte-Java/Microblog-Registration.git","ssh_url":"git@github.com:TIY-Charlotte-Java/Microblog-Registration.git","clone_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration.git","svn_url":"https://github.com/TIY-Charlotte-Java/Microblog-Registration","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1"},"html":{"href":"https://github.com/TIY-Charlotte-Java/Microblog-Registration/pull/1"},"issue":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/1"},"comments":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/TIY-Charlotte-Java/Microblog-Registration/statuses/45ad507e1a1afe9cba21ab811b7248e6e5eb6bd1"}}}}