{"action":"created","comment":{"url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/comments/71492799","id":71492799,"diff_hunk":"@@ -236,6 +237,15 @@ func (interactor *ProfileInteractor) AddGame(userId, libraryId int, gameName, ga\n \t\t// interactor.Logger.Log(err.Error())\n \t\treturn 0, err, 403\n \t}\n+\texisted, err := interactor.GameRepository.GameExisted(gameName, libraryId)\n+\tif err != nil {\n+\t\treturn 0, err, 500\n+\t}\n+\tif existed {\n+\t\terr := fmt.Errorf(\"Game '%s' is already in library\", gameName)\n+\t\t// interactor.Logger.Log(err.Error())\n+\t\treturn 0, err, 403","path":"usecases/usecases.go","position":321,"original_position":40,"commit_id":"54254637f0a12f63a2209bcd304bdb9bfafeee1f","original_commit_id":"54254637f0a12f63a2209bcd304bdb9bfafeee1f","user":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"body":"Makes sense. The same for `<403>` \"Username '%s' is taken\"?","created_at":"2016-07-20T09:28:00Z","updated_at":"2016-07-20T09:28:00Z","html_url":"https://github.com/frostablevenus/game-tracker/pull/6#discussion_r71492799","pull_request_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/comments/71492799"},"html":{"href":"https://github.com/frostablevenus/game-tracker/pull/6#discussion_r71492799"},"pull_request":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6","id":77913250,"html_url":"https://github.com/frostablevenus/game-tracker/pull/6","diff_url":"https://github.com/frostablevenus/game-tracker/pull/6.diff","patch_url":"https://github.com/frostablevenus/game-tracker/pull/6.patch","issue_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/6","number":6,"state":"open","locked":false,"title":"Implement Restful","user":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"body":"Added Restful model to the program. Please check the commit message for the detailed description of changes.","created_at":"2016-07-19T03:35:35Z","updated_at":"2016-07-20T09:28:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed57ac2f53a3f58f738c040f373409be3f916e6d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6/commits","review_comments_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6/comments","review_comment_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/6/comments","statuses_url":"https://api.github.com/repos/frostablevenus/game-tracker/statuses/54254637f0a12f63a2209bcd304bdb9bfafeee1f","head":{"label":"frostablevenus:restful","ref":"restful","sha":"54254637f0a12f63a2209bcd304bdb9bfafeee1f","user":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"repo":{"id":62686558,"name":"game-tracker","full_name":"frostablevenus/game-tracker","owner":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frostablevenus/game-tracker","description":null,"fork":false,"url":"https://api.github.com/repos/frostablevenus/game-tracker","forks_url":"https://api.github.com/repos/frostablevenus/game-tracker/forks","keys_url":"https://api.github.com/repos/frostablevenus/game-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frostablevenus/game-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frostablevenus/game-tracker/teams","hooks_url":"https://api.github.com/repos/frostablevenus/game-tracker/hooks","issue_events_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/frostablevenus/game-tracker/events","assignees_url":"https://api.github.com/repos/frostablevenus/game-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/frostablevenus/game-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/frostablevenus/game-tracker/tags","blobs_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frostablevenus/game-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/frostablevenus/game-tracker/languages","stargazers_url":"https://api.github.com/repos/frostablevenus/game-tracker/stargazers","contributors_url":"https://api.github.com/repos/frostablevenus/game-tracker/contributors","subscribers_url":"https://api.github.com/repos/frostablevenus/game-tracker/subscribers","subscription_url":"https://api.github.com/repos/frostablevenus/game-tracker/subscription","commits_url":"https://api.github.com/repos/frostablevenus/game-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/frostablevenus/game-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/frostablevenus/game-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/frostablevenus/game-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frostablevenus/game-tracker/merges","archive_url":"https://api.github.com/repos/frostablevenus/game-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frostablevenus/game-tracker/downloads","issues_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/frostablevenus/game-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/frostablevenus/game-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frostablevenus/game-tracker/labels{/name}","releases_url":"https://api.github.com/repos/frostablevenus/game-tracker/releases{/id}","deployments_url":"https://api.github.com/repos/frostablevenus/game-tracker/deployments","created_at":"2016-07-06T02:59:38Z","updated_at":"2016-07-18T08:43:25Z","pushed_at":"2016-07-20T09:00:50Z","git_url":"git://github.com/frostablevenus/game-tracker.git","ssh_url":"git@github.com:frostablevenus/game-tracker.git","clone_url":"https://github.com/frostablevenus/game-tracker.git","svn_url":"https://github.com/frostablevenus/game-tracker","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Go","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"}},"base":{"label":"frostablevenus:master","ref":"master","sha":"a3227a4fa37b1ef8a440bbb33de291b721a4f6cd","user":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"repo":{"id":62686558,"name":"game-tracker","full_name":"frostablevenus/game-tracker","owner":{"login":"frostablevenus","id":15098505,"avatar_url":"https://avatars.githubusercontent.com/u/15098505?v=3","gravatar_id":"","url":"https://api.github.com/users/frostablevenus","html_url":"https://github.com/frostablevenus","followers_url":"https://api.github.com/users/frostablevenus/followers","following_url":"https://api.github.com/users/frostablevenus/following{/other_user}","gists_url":"https://api.github.com/users/frostablevenus/gists{/gist_id}","starred_url":"https://api.github.com/users/frostablevenus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frostablevenus/subscriptions","organizations_url":"https://api.github.com/users/frostablevenus/orgs","repos_url":"https://api.github.com/users/frostablevenus/repos","events_url":"https://api.github.com/users/frostablevenus/events{/privacy}","received_events_url":"https://api.github.com/users/frostablevenus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frostablevenus/game-tracker","description":null,"fork":false,"url":"https://api.github.com/repos/frostablevenus/game-tracker","forks_url":"https://api.github.com/repos/frostablevenus/game-tracker/forks","keys_url":"https://api.github.com/repos/frostablevenus/game-tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frostablevenus/game-tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frostablevenus/game-tracker/teams","hooks_url":"https://api.github.com/repos/frostablevenus/game-tracker/hooks","issue_events_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/events{/number}","events_url":"https://api.github.com/repos/frostablevenus/game-tracker/events","assignees_url":"https://api.github.com/repos/frostablevenus/game-tracker/assignees{/user}","branches_url":"https://api.github.com/repos/frostablevenus/game-tracker/branches{/branch}","tags_url":"https://api.github.com/repos/frostablevenus/game-tracker/tags","blobs_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frostablevenus/game-tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/frostablevenus/game-tracker/languages","stargazers_url":"https://api.github.com/repos/frostablevenus/game-tracker/stargazers","contributors_url":"https://api.github.com/repos/frostablevenus/game-tracker/contributors","subscribers_url":"https://api.github.com/repos/frostablevenus/game-tracker/subscribers","subscription_url":"https://api.github.com/repos/frostablevenus/game-tracker/subscription","commits_url":"https://api.github.com/repos/frostablevenus/game-tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/frostablevenus/game-tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/frostablevenus/game-tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/frostablevenus/game-tracker/contents/{+path}","compare_url":"https://api.github.com/repos/frostablevenus/game-tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frostablevenus/game-tracker/merges","archive_url":"https://api.github.com/repos/frostablevenus/game-tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frostablevenus/game-tracker/downloads","issues_url":"https://api.github.com/repos/frostablevenus/game-tracker/issues{/number}","pulls_url":"https://api.github.com/repos/frostablevenus/game-tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/frostablevenus/game-tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/frostablevenus/game-tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frostablevenus/game-tracker/labels{/name}","releases_url":"https://api.github.com/repos/frostablevenus/game-tracker/releases{/id}","deployments_url":"https://api.github.com/repos/frostablevenus/game-tracker/deployments","created_at":"2016-07-06T02:59:38Z","updated_at":"2016-07-18T08:43:25Z","pushed_at":"2016-07-20T09:00:50Z","git_url":"git://github.com/frostablevenus/game-tracker.git","ssh_url":"git@github.com:frostablevenus/game-tracker.git","clone_url":"https://github.com/frostablevenus/game-tracker.git","svn_url":"https://github.com/frostablevenus/game-tracker","homepage":null,"size":24,"stargazers_count":0,"watchers_count":0,"language":"Go","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/frostablevenus/game-tracker/pulls/6"},"html":{"href":"https://github.com/frostablevenus/game-tracker/pull/6"},"issue":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/issues/6"},"comments":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/frostablevenus/game-tracker/statuses/54254637f0a12f63a2209bcd304bdb9bfafeee1f"}}}}
{"actor":{"display_login":"frostablevenus"}}