{"action":"created","comment":{"url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/comments/97592475","pull_request_review_id":18194508,"id":97592475,"diff_hunk":"@@ -0,0 +1,38 @@\n+package nc.students.ayaz.controllers;\n+\n+\n+import nc.students.ayaz.model.User;\n+import nc.students.ayaz.model.Video;\n+import nc.students.ayaz.model.exceptions.NoSuchVideoException;\n+import nc.students.ayaz.repositories.UserRepository;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.http.HttpStatus;\n+import org.springframework.web.bind.annotation.*;\n+\n+@RestController\n+@RequestMapping(value = \"/users/{nickname}/videos\")\n+public class VideosController {\n+\n+    @Autowired\n+    private UserRepository repository;\n+\n+    @PostMapping(\"/{videoName}\")\n+    @ResponseStatus(HttpStatus.CREATED)\n+    public void createVideo(@PathVariable String nickname, @PathVariable String videoName) throws Exception {","path":"src/main/java/nc/students/ayaz/controllers/VideosController.java","position":21,"original_position":21,"commit_id":"56b2cdedb7108768019cd542d3e8b4e3629f239e","original_commit_id":"56b2cdedb7108768019cd542d3e8b4e3629f239e","user":{"login":"LasTshaMAN","id":7031569,"avatar_url":"https://avatars.githubusercontent.com/u/7031569?v=3","gravatar_id":"","url":"https://api.github.com/users/LasTshaMAN","html_url":"https://github.com/LasTshaMAN","followers_url":"https://api.github.com/users/LasTshaMAN/followers","following_url":"https://api.github.com/users/LasTshaMAN/following{/other_user}","gists_url":"https://api.github.com/users/LasTshaMAN/gists{/gist_id}","starred_url":"https://api.github.com/users/LasTshaMAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LasTshaMAN/subscriptions","organizations_url":"https://api.github.com/users/LasTshaMAN/orgs","repos_url":"https://api.github.com/users/LasTshaMAN/repos","events_url":"https://api.github.com/users/LasTshaMAN/events{/privacy}","received_events_url":"https://api.github.com/users/LasTshaMAN/received_events","type":"User","site_admin":false},"body":"&#x1F34E; **Issue**\r\nWhy do you throw Exception, while handle only specific type of Exception (NoSuchVideoException).\r\nE.g. if I'll try to send a GET request on \"/users/nonexistent_user/videos/whatever_video\" I will get 500 instead of 404.","created_at":"2017-01-24T16:42:51Z","updated_at":"2017-01-24T16:55:08Z","html_url":"https://github.com/shouldDoFine/Ayaz_Project/pull/5#discussion_r97592475","pull_request_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/comments/97592475"},"html":{"href":"https://github.com/shouldDoFine/Ayaz_Project/pull/5#discussion_r97592475"},"pull_request":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5","id":102375583,"html_url":"https://github.com/shouldDoFine/Ayaz_Project/pull/5","diff_url":"https://github.com/shouldDoFine/Ayaz_Project/pull/5.diff","patch_url":"https://github.com/shouldDoFine/Ayaz_Project/pull/5.patch","issue_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/5","number":5,"state":"open","locked":false,"title":"added controllers with integration tests. I think mocking will make t…","user":{"login":"hwasin","id":6069289,"avatar_url":"https://avatars.githubusercontent.com/u/6069289?v=3","gravatar_id":"","url":"https://api.github.com/users/hwasin","html_url":"https://github.com/hwasin","followers_url":"https://api.github.com/users/hwasin/followers","following_url":"https://api.github.com/users/hwasin/following{/other_user}","gists_url":"https://api.github.com/users/hwasin/gists{/gist_id}","starred_url":"https://api.github.com/users/hwasin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hwasin/subscriptions","organizations_url":"https://api.github.com/users/hwasin/orgs","repos_url":"https://api.github.com/users/hwasin/repos","events_url":"https://api.github.com/users/hwasin/events{/privacy}","received_events_url":"https://api.github.com/users/hwasin/received_events","type":"User","site_admin":false},"body":"…esting code huge. I will try to mock in future commits. There are a lot of controllers to write further, but i think 2 controller classes are enough at the beginning.","created_at":"2017-01-20T00:10:00Z","updated_at":"2017-01-24T16:55:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3faec4eaf92b5e99f1a6552cd646f83c75f3998c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5/commits","review_comments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5/comments","review_comment_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/5/comments","statuses_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/statuses/56b2cdedb7108768019cd542d3e8b4e3629f239e","head":{"label":"shouldDoFine:feature/adding_controllers","ref":"feature/adding_controllers","sha":"56b2cdedb7108768019cd542d3e8b4e3629f239e","user":{"login":"shouldDoFine","id":23137877,"avatar_url":"https://avatars.githubusercontent.com/u/23137877?v=3","gravatar_id":"","url":"https://api.github.com/users/shouldDoFine","html_url":"https://github.com/shouldDoFine","followers_url":"https://api.github.com/users/shouldDoFine/followers","following_url":"https://api.github.com/users/shouldDoFine/following{/other_user}","gists_url":"https://api.github.com/users/shouldDoFine/gists{/gist_id}","starred_url":"https://api.github.com/users/shouldDoFine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shouldDoFine/subscriptions","organizations_url":"https://api.github.com/users/shouldDoFine/orgs","repos_url":"https://api.github.com/users/shouldDoFine/repos","events_url":"https://api.github.com/users/shouldDoFine/events{/privacy}","received_events_url":"https://api.github.com/users/shouldDoFine/received_events","type":"User","site_admin":false},"repo":{"id":74233661,"name":"Ayaz_Project","full_name":"shouldDoFine/Ayaz_Project","owner":{"login":"shouldDoFine","id":23137877,"avatar_url":"https://avatars.githubusercontent.com/u/23137877?v=3","gravatar_id":"","url":"https://api.github.com/users/shouldDoFine","html_url":"https://github.com/shouldDoFine","followers_url":"https://api.github.com/users/shouldDoFine/followers","following_url":"https://api.github.com/users/shouldDoFine/following{/other_user}","gists_url":"https://api.github.com/users/shouldDoFine/gists{/gist_id}","starred_url":"https://api.github.com/users/shouldDoFine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shouldDoFine/subscriptions","organizations_url":"https://api.github.com/users/shouldDoFine/orgs","repos_url":"https://api.github.com/users/shouldDoFine/repos","events_url":"https://api.github.com/users/shouldDoFine/events{/privacy}","received_events_url":"https://api.github.com/users/shouldDoFine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shouldDoFine/Ayaz_Project","description":null,"fork":false,"url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project","forks_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/forks","keys_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/teams","hooks_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/hooks","issue_events_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/events{/number}","events_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/events","assignees_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/assignees{/user}","branches_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/branches{/branch}","tags_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/tags","blobs_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/languages","stargazers_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/stargazers","contributors_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/contributors","subscribers_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/subscribers","subscription_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/subscription","commits_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/contents/{+path}","compare_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/merges","archive_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/downloads","issues_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues{/number}","pulls_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/labels{/name}","releases_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/releases{/id}","deployments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/deployments","created_at":"2016-11-19T20:30:22Z","updated_at":"2017-01-14T17:25:44Z","pushed_at":"2017-01-24T15:15:55Z","git_url":"git://github.com/shouldDoFine/Ayaz_Project.git","ssh_url":"git@github.com:shouldDoFine/Ayaz_Project.git","clone_url":"https://github.com/shouldDoFine/Ayaz_Project.git","svn_url":"https://github.com/shouldDoFine/Ayaz_Project","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"shouldDoFine:master","ref":"master","sha":"e5e8e0f0d47b2d2fcb0d790ceca67933012b9e44","user":{"login":"shouldDoFine","id":23137877,"avatar_url":"https://avatars.githubusercontent.com/u/23137877?v=3","gravatar_id":"","url":"https://api.github.com/users/shouldDoFine","html_url":"https://github.com/shouldDoFine","followers_url":"https://api.github.com/users/shouldDoFine/followers","following_url":"https://api.github.com/users/shouldDoFine/following{/other_user}","gists_url":"https://api.github.com/users/shouldDoFine/gists{/gist_id}","starred_url":"https://api.github.com/users/shouldDoFine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shouldDoFine/subscriptions","organizations_url":"https://api.github.com/users/shouldDoFine/orgs","repos_url":"https://api.github.com/users/shouldDoFine/repos","events_url":"https://api.github.com/users/shouldDoFine/events{/privacy}","received_events_url":"https://api.github.com/users/shouldDoFine/received_events","type":"User","site_admin":false},"repo":{"id":74233661,"name":"Ayaz_Project","full_name":"shouldDoFine/Ayaz_Project","owner":{"login":"shouldDoFine","id":23137877,"avatar_url":"https://avatars.githubusercontent.com/u/23137877?v=3","gravatar_id":"","url":"https://api.github.com/users/shouldDoFine","html_url":"https://github.com/shouldDoFine","followers_url":"https://api.github.com/users/shouldDoFine/followers","following_url":"https://api.github.com/users/shouldDoFine/following{/other_user}","gists_url":"https://api.github.com/users/shouldDoFine/gists{/gist_id}","starred_url":"https://api.github.com/users/shouldDoFine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shouldDoFine/subscriptions","organizations_url":"https://api.github.com/users/shouldDoFine/orgs","repos_url":"https://api.github.com/users/shouldDoFine/repos","events_url":"https://api.github.com/users/shouldDoFine/events{/privacy}","received_events_url":"https://api.github.com/users/shouldDoFine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shouldDoFine/Ayaz_Project","description":null,"fork":false,"url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project","forks_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/forks","keys_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/teams","hooks_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/hooks","issue_events_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/events{/number}","events_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/events","assignees_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/assignees{/user}","branches_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/branches{/branch}","tags_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/tags","blobs_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/refs{/sha}","trees_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/statuses/{sha}","languages_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/languages","stargazers_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/stargazers","contributors_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/contributors","subscribers_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/subscribers","subscription_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/subscription","commits_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/commits{/sha}","git_commits_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/git/commits{/sha}","comments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/comments{/number}","issue_comment_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/comments{/number}","contents_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/contents/{+path}","compare_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/merges","archive_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/downloads","issues_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues{/number}","pulls_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls{/number}","milestones_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/milestones{/number}","notifications_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/labels{/name}","releases_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/releases{/id}","deployments_url":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/deployments","created_at":"2016-11-19T20:30:22Z","updated_at":"2017-01-14T17:25:44Z","pushed_at":"2017-01-24T15:15:55Z","git_url":"git://github.com/shouldDoFine/Ayaz_Project.git","ssh_url":"git@github.com:shouldDoFine/Ayaz_Project.git","clone_url":"https://github.com/shouldDoFine/Ayaz_Project.git","svn_url":"https://github.com/shouldDoFine/Ayaz_Project","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5"},"html":{"href":"https://github.com/shouldDoFine/Ayaz_Project/pull/5"},"issue":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/5"},"comments":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/shouldDoFine/Ayaz_Project/statuses/56b2cdedb7108768019cd542d3e8b4e3629f239e"}}}}
{"actor":{"display_login":"LasTshaMAN"}}