{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments/184488413","pull_request_review_id":115695949,"id":184488413,"diff_hunk":"@@ -0,0 +1,84 @@\n+class TweetsController < ApplicationController\n+\n+  get '/tweets' do\n+    if logged_in?\n+        @tweets = Tweet.all\n+        erb :'/tweets/tweets'\n+    else\n+        redirect '/login'\n+    end\n+  end\n+\n+  get '/tweets/new' do\n+    #load create tweet form\n+    if logged_in?\n+      erb :'/tweets/create_tweet'\n+    else\n+      redirect \"/login\"\n+    end\n+  end\n+\n+  get '/tweets/:id' do\n+    #individual show tweet page\n+    if logged_in?\n+      @tweet = Tweet.find_by_id(params[:id])\n+      erb :'/tweets/show_tweet'\n+    else\n+      redirect to '/login'\n+    end\n+  end\n+\n+  get '/tweets/:id/edit' do\n+    #load form to edit tweet\n+    #find specific tweet from params[:id] to preload form\n+    if logged_in?\n+      @tweet = Tweet.find_by_id(params[:id])","path":"app/controllers/tweets_controller.rb","position":35,"original_position":35,"commit_id":"9e36bebd03892e2e6f6f2ffa1627217ba29b41a0","original_commit_id":"9e36bebd03892e2e6f6f2ffa1627217ba29b41a0","user":{"login":"weezwo","id":19954790,"avatar_url":"https://avatars3.githubusercontent.com/u/19954790?v=4","gravatar_id":"","url":"https://api.github.com/users/weezwo","html_url":"https://github.com/weezwo","followers_url":"https://api.github.com/users/weezwo/followers","following_url":"https://api.github.com/users/weezwo/following{/other_user}","gists_url":"https://api.github.com/users/weezwo/gists{/gist_id}","starred_url":"https://api.github.com/users/weezwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weezwo/subscriptions","organizations_url":"https://api.github.com/users/weezwo/orgs","repos_url":"https://api.github.com/users/weezwo/repos","events_url":"https://api.github.com/users/weezwo/events{/privacy}","received_events_url":"https://api.github.com/users/weezwo/received_events","type":"User","site_admin":false},"body":"Shouldn't you verify a tweet belongs to the `current_user` (and not just that any user is logged in) before allowing them to edit?\r\n","created_at":"2018-04-26T18:28:03Z","updated_at":"2018-04-26T18:28:42Z","html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725#discussion_r184488413","pull_request_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments/184488413"},"html":{"href":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725#discussion_r184488413"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725","id":180969032,"html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725","diff_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725.diff","patch_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725.patch","issue_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/725","number":725,"state":"open","locked":false,"title":"Project submitted","user":{"login":"stazman","id":30670390,"avatar_url":"https://avatars3.githubusercontent.com/u/30670390?v=4","gravatar_id":"","url":"https://api.github.com/users/stazman","html_url":"https://github.com/stazman","followers_url":"https://api.github.com/users/stazman/followers","following_url":"https://api.github.com/users/stazman/following{/other_user}","gists_url":"https://api.github.com/users/stazman/gists{/gist_id}","starred_url":"https://api.github.com/users/stazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stazman/subscriptions","organizations_url":"https://api.github.com/users/stazman/orgs","repos_url":"https://api.github.com/users/stazman/repos","events_url":"https://api.github.com/users/stazman/events{/privacy}","received_events_url":"https://api.github.com/users/stazman/received_events","type":"User","site_admin":false},"body":null,"created_at":"2018-04-11T17:03:14Z","updated_at":"2018-04-26T18:28:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb9e30d8342481567f1bcbec7a2fbb59b7f2f937","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725/comments","review_comment_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/725/comments","statuses_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/9e36bebd03892e2e6f6f2ffa1627217ba29b41a0","head":{"label":"stazman:master","ref":"master","sha":"9e36bebd03892e2e6f6f2ffa1627217ba29b41a0","user":{"login":"stazman","id":30670390,"avatar_url":"https://avatars3.githubusercontent.com/u/30670390?v=4","gravatar_id":"","url":"https://api.github.com/users/stazman","html_url":"https://github.com/stazman","followers_url":"https://api.github.com/users/stazman/followers","following_url":"https://api.github.com/users/stazman/following{/other_user}","gists_url":"https://api.github.com/users/stazman/gists{/gist_id}","starred_url":"https://api.github.com/users/stazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stazman/subscriptions","organizations_url":"https://api.github.com/users/stazman/orgs","repos_url":"https://api.github.com/users/stazman/repos","events_url":"https://api.github.com/users/stazman/events{/privacy}","received_events_url":"https://api.github.com/users/stazman/received_events","type":"User","site_admin":false},"repo":{"id":128931899,"name":"sinatra-fwitter-group-project-v-000","full_name":"stazman/sinatra-fwitter-group-project-v-000","owner":{"login":"stazman","id":30670390,"avatar_url":"https://avatars3.githubusercontent.com/u/30670390?v=4","gravatar_id":"","url":"https://api.github.com/users/stazman","html_url":"https://github.com/stazman","followers_url":"https://api.github.com/users/stazman/followers","following_url":"https://api.github.com/users/stazman/following{/other_user}","gists_url":"https://api.github.com/users/stazman/gists{/gist_id}","starred_url":"https://api.github.com/users/stazman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stazman/subscriptions","organizations_url":"https://api.github.com/users/stazman/orgs","repos_url":"https://api.github.com/users/stazman/repos","events_url":"https://api.github.com/users/stazman/events{/privacy}","received_events_url":"https://api.github.com/users/stazman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stazman/sinatra-fwitter-group-project-v-000","description":null,"fork":true,"url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000","forks_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/forks","keys_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/teams","hooks_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/events","assignees_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/tags","blobs_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/languages","stargazers_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/subscription","commits_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/merges","archive_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/downloads","issues_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/stazman/sinatra-fwitter-group-project-v-000/deployments","created_at":"2018-04-10T12:50:09Z","updated_at":"2018-04-11T16:58:01Z","pushed_at":"2018-04-11T16:57:57Z","git_url":"git://github.com/stazman/sinatra-fwitter-group-project-v-000.git","ssh_url":"git@github.com:stazman/sinatra-fwitter-group-project-v-000.git","clone_url":"https://github.com/stazman/sinatra-fwitter-group-project-v-000.git","svn_url":"https://github.com/stazman/sinatra-fwitter-group-project-v-000","homepage":null,"size":102,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-students:master","ref":"master","sha":"b9f1f801b1932a181034de9f9534d64e64c338d6","user":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars3.githubusercontent.com/u/8825476?v=4","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"repo":{"id":48708806,"name":"sinatra-fwitter-group-project-v-000","full_name":"learn-co-students/sinatra-fwitter-group-project-v-000","owner":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars3.githubusercontent.com/u/8825476?v=4","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000","description":null,"fork":false,"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000","forks_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/forks","keys_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/teams","hooks_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/events","assignees_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/tags","blobs_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/languages","stargazers_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/subscription","commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/merges","archive_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/downloads","issues_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/deployments","created_at":"2015-12-28T19:27:58Z","updated_at":"2018-04-07T21:39:03Z","pushed_at":"2018-04-25T19:28:30Z","git_url":"git://github.com/learn-co-students/sinatra-fwitter-group-project-v-000.git","ssh_url":"git@github.com:learn-co-students/sinatra-fwitter-group-project-v-000.git","clone_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000.git","svn_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000","homepage":null,"size":62,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":765,"mirror_url":null,"archived":false,"open_issues_count":650,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":765,"open_issues":650,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725"},"html":{"href":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/725"},"issue":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/725"},"comments":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/725/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/725/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/9e36bebd03892e2e6f6f2ffa1627217ba29b41a0"}},"author_association":"NONE"}}
{"actor":{"display_login":"weezwo"}}