{"action":"created","comment":{"url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/comments/37175257","id":37175257,"diff_hunk":"@@ -0,0 +1,72 @@\n+;(function () {\n+  angular\n+    .module(\"todo\")\n+    .service(\"SessionService\", SessionService);\n+\n+  SessionService.$inject = [\"$http\", \"API\", \"$state\"];\n+\n+  function SessionService($http, API, $state) {\n+    var self = this;\n+    self.user = {\n+      userView: \"list\"\n+    };\n+    self.getUser = getUser;\n+    self.login = login;\n+    self.registration = registration;\n+    self.logout = logout;\n+\n+    self.getUser();\n+\n+    function getUser() {\n+      $http.get(API.BASE + API.AUTH + API.INFO)\n+        .then(function (response) {\n+          self.user.data = response.data.user;\n+          $state.go(\"groups.list\");\n+        })\n+        .catch(function () {});","path":"app/components/session.service.js","position":26,"original_position":26,"commit_id":"f52f690e5687ae2bf56c7530216cf8db991ec8f3","original_commit_id":"f52f690e5687ae2bf56c7530216cf8db991ec8f3","user":{"login":"alekseyC64","id":4508216,"avatar_url":"https://avatars.githubusercontent.com/u/4508216?v=3","gravatar_id":"","url":"https://api.github.com/users/alekseyC64","html_url":"https://github.com/alekseyC64","followers_url":"https://api.github.com/users/alekseyC64/followers","following_url":"https://api.github.com/users/alekseyC64/following{/other_user}","gists_url":"https://api.github.com/users/alekseyC64/gists{/gist_id}","starred_url":"https://api.github.com/users/alekseyC64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alekseyC64/subscriptions","organizations_url":"https://api.github.com/users/alekseyC64/orgs","repos_url":"https://api.github.com/users/alekseyC64/repos","events_url":"https://api.github.com/users/alekseyC64/events{/privacy}","received_events_url":"https://api.github.com/users/alekseyC64/received_events","type":"User","site_admin":false},"body":"there is no sense in such `catch` code","created_at":"2015-08-17T10:33:59Z","updated_at":"2015-08-17T10:33:59Z","html_url":"https://github.com/NikitaSedyx/todo-list/pull/42#discussion_r37175257","pull_request_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/comments/37175257"},"html":{"href":"https://github.com/NikitaSedyx/todo-list/pull/42#discussion_r37175257"},"pull_request":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42","id":42568111,"html_url":"https://github.com/NikitaSedyx/todo-list/pull/42","diff_url":"https://github.com/NikitaSedyx/todo-list/pull/42.diff","patch_url":"https://github.com/NikitaSedyx/todo-list/pull/42.patch","issue_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/42","number":42,"state":"open","locked":false,"title":"rewrite registration login logout.","user":{"login":"atreidas1","id":13235962,"avatar_url":"https://avatars.githubusercontent.com/u/13235962?v=3","gravatar_id":"","url":"https://api.github.com/users/atreidas1","html_url":"https://github.com/atreidas1","followers_url":"https://api.github.com/users/atreidas1/followers","following_url":"https://api.github.com/users/atreidas1/following{/other_user}","gists_url":"https://api.github.com/users/atreidas1/gists{/gist_id}","starred_url":"https://api.github.com/users/atreidas1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atreidas1/subscriptions","organizations_url":"https://api.github.com/users/atreidas1/orgs","repos_url":"https://api.github.com/users/atreidas1/repos","events_url":"https://api.github.com/users/atreidas1/events{/privacy}","received_events_url":"https://api.github.com/users/atreidas1/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-17T09:18:22Z","updated_at":"2015-08-17T10:33:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"856047453f4665c6e62522ccb3fa1738a3819c38","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42/commits","review_comments_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42/comments","review_comment_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/42/comments","statuses_url":"https://api.github.com/repos/NikitaSedyx/todo-list/statuses/f52f690e5687ae2bf56c7530216cf8db991ec8f3","head":{"label":"NikitaSedyx:register-login-logout-refactored","ref":"register-login-logout-refactored","sha":"f52f690e5687ae2bf56c7530216cf8db991ec8f3","user":{"login":"NikitaSedyx","id":12440608,"avatar_url":"https://avatars.githubusercontent.com/u/12440608?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaSedyx","html_url":"https://github.com/NikitaSedyx","followers_url":"https://api.github.com/users/NikitaSedyx/followers","following_url":"https://api.github.com/users/NikitaSedyx/following{/other_user}","gists_url":"https://api.github.com/users/NikitaSedyx/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaSedyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaSedyx/subscriptions","organizations_url":"https://api.github.com/users/NikitaSedyx/orgs","repos_url":"https://api.github.com/users/NikitaSedyx/repos","events_url":"https://api.github.com/users/NikitaSedyx/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaSedyx/received_events","type":"User","site_admin":false},"repo":{"id":37664997,"name":"todo-list","full_name":"NikitaSedyx/todo-list","owner":{"login":"NikitaSedyx","id":12440608,"avatar_url":"https://avatars.githubusercontent.com/u/12440608?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaSedyx","html_url":"https://github.com/NikitaSedyx","followers_url":"https://api.github.com/users/NikitaSedyx/followers","following_url":"https://api.github.com/users/NikitaSedyx/following{/other_user}","gists_url":"https://api.github.com/users/NikitaSedyx/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaSedyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaSedyx/subscriptions","organizations_url":"https://api.github.com/users/NikitaSedyx/orgs","repos_url":"https://api.github.com/users/NikitaSedyx/repos","events_url":"https://api.github.com/users/NikitaSedyx/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaSedyx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NikitaSedyx/todo-list","description":"","fork":false,"url":"https://api.github.com/repos/NikitaSedyx/todo-list","forks_url":"https://api.github.com/repos/NikitaSedyx/todo-list/forks","keys_url":"https://api.github.com/repos/NikitaSedyx/todo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NikitaSedyx/todo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NikitaSedyx/todo-list/teams","hooks_url":"https://api.github.com/repos/NikitaSedyx/todo-list/hooks","issue_events_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/events{/number}","events_url":"https://api.github.com/repos/NikitaSedyx/todo-list/events","assignees_url":"https://api.github.com/repos/NikitaSedyx/todo-list/assignees{/user}","branches_url":"https://api.github.com/repos/NikitaSedyx/todo-list/branches{/branch}","tags_url":"https://api.github.com/repos/NikitaSedyx/todo-list/tags","blobs_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NikitaSedyx/todo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/NikitaSedyx/todo-list/languages","stargazers_url":"https://api.github.com/repos/NikitaSedyx/todo-list/stargazers","contributors_url":"https://api.github.com/repos/NikitaSedyx/todo-list/contributors","subscribers_url":"https://api.github.com/repos/NikitaSedyx/todo-list/subscribers","subscription_url":"https://api.github.com/repos/NikitaSedyx/todo-list/subscription","commits_url":"https://api.github.com/repos/NikitaSedyx/todo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/NikitaSedyx/todo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/NikitaSedyx/todo-list/contents/{+path}","compare_url":"https://api.github.com/repos/NikitaSedyx/todo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NikitaSedyx/todo-list/merges","archive_url":"https://api.github.com/repos/NikitaSedyx/todo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NikitaSedyx/todo-list/downloads","issues_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues{/number}","pulls_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/NikitaSedyx/todo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/NikitaSedyx/todo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NikitaSedyx/todo-list/labels{/name}","releases_url":"https://api.github.com/repos/NikitaSedyx/todo-list/releases{/id}","created_at":"2015-06-18T14:40:10Z","updated_at":"2015-06-22T13:50:25Z","pushed_at":"2015-08-17T09:56:09Z","git_url":"git://github.com/NikitaSedyx/todo-list.git","ssh_url":"git@github.com:NikitaSedyx/todo-list.git","clone_url":"https://github.com/NikitaSedyx/todo-list.git","svn_url":"https://github.com/NikitaSedyx/todo-list","homepage":null,"size":788,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"NikitaSedyx:master","ref":"master","sha":"9d3547d531c0b9f73043d333047a7b1e2c8a4ad4","user":{"login":"NikitaSedyx","id":12440608,"avatar_url":"https://avatars.githubusercontent.com/u/12440608?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaSedyx","html_url":"https://github.com/NikitaSedyx","followers_url":"https://api.github.com/users/NikitaSedyx/followers","following_url":"https://api.github.com/users/NikitaSedyx/following{/other_user}","gists_url":"https://api.github.com/users/NikitaSedyx/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaSedyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaSedyx/subscriptions","organizations_url":"https://api.github.com/users/NikitaSedyx/orgs","repos_url":"https://api.github.com/users/NikitaSedyx/repos","events_url":"https://api.github.com/users/NikitaSedyx/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaSedyx/received_events","type":"User","site_admin":false},"repo":{"id":37664997,"name":"todo-list","full_name":"NikitaSedyx/todo-list","owner":{"login":"NikitaSedyx","id":12440608,"avatar_url":"https://avatars.githubusercontent.com/u/12440608?v=3","gravatar_id":"","url":"https://api.github.com/users/NikitaSedyx","html_url":"https://github.com/NikitaSedyx","followers_url":"https://api.github.com/users/NikitaSedyx/followers","following_url":"https://api.github.com/users/NikitaSedyx/following{/other_user}","gists_url":"https://api.github.com/users/NikitaSedyx/gists{/gist_id}","starred_url":"https://api.github.com/users/NikitaSedyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NikitaSedyx/subscriptions","organizations_url":"https://api.github.com/users/NikitaSedyx/orgs","repos_url":"https://api.github.com/users/NikitaSedyx/repos","events_url":"https://api.github.com/users/NikitaSedyx/events{/privacy}","received_events_url":"https://api.github.com/users/NikitaSedyx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NikitaSedyx/todo-list","description":"","fork":false,"url":"https://api.github.com/repos/NikitaSedyx/todo-list","forks_url":"https://api.github.com/repos/NikitaSedyx/todo-list/forks","keys_url":"https://api.github.com/repos/NikitaSedyx/todo-list/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NikitaSedyx/todo-list/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NikitaSedyx/todo-list/teams","hooks_url":"https://api.github.com/repos/NikitaSedyx/todo-list/hooks","issue_events_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/events{/number}","events_url":"https://api.github.com/repos/NikitaSedyx/todo-list/events","assignees_url":"https://api.github.com/repos/NikitaSedyx/todo-list/assignees{/user}","branches_url":"https://api.github.com/repos/NikitaSedyx/todo-list/branches{/branch}","tags_url":"https://api.github.com/repos/NikitaSedyx/todo-list/tags","blobs_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/refs{/sha}","trees_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NikitaSedyx/todo-list/statuses/{sha}","languages_url":"https://api.github.com/repos/NikitaSedyx/todo-list/languages","stargazers_url":"https://api.github.com/repos/NikitaSedyx/todo-list/stargazers","contributors_url":"https://api.github.com/repos/NikitaSedyx/todo-list/contributors","subscribers_url":"https://api.github.com/repos/NikitaSedyx/todo-list/subscribers","subscription_url":"https://api.github.com/repos/NikitaSedyx/todo-list/subscription","commits_url":"https://api.github.com/repos/NikitaSedyx/todo-list/commits{/sha}","git_commits_url":"https://api.github.com/repos/NikitaSedyx/todo-list/git/commits{/sha}","comments_url":"https://api.github.com/repos/NikitaSedyx/todo-list/comments{/number}","issue_comment_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/comments{/number}","contents_url":"https://api.github.com/repos/NikitaSedyx/todo-list/contents/{+path}","compare_url":"https://api.github.com/repos/NikitaSedyx/todo-list/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NikitaSedyx/todo-list/merges","archive_url":"https://api.github.com/repos/NikitaSedyx/todo-list/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NikitaSedyx/todo-list/downloads","issues_url":"https://api.github.com/repos/NikitaSedyx/todo-list/issues{/number}","pulls_url":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls{/number}","milestones_url":"https://api.github.com/repos/NikitaSedyx/todo-list/milestones{/number}","notifications_url":"https://api.github.com/repos/NikitaSedyx/todo-list/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NikitaSedyx/todo-list/labels{/name}","releases_url":"https://api.github.com/repos/NikitaSedyx/todo-list/releases{/id}","created_at":"2015-06-18T14:40:10Z","updated_at":"2015-06-22T13:50:25Z","pushed_at":"2015-08-17T09:56:09Z","git_url":"git://github.com/NikitaSedyx/todo-list.git","ssh_url":"git@github.com:NikitaSedyx/todo-list.git","clone_url":"https://github.com/NikitaSedyx/todo-list.git","svn_url":"https://github.com/NikitaSedyx/todo-list","homepage":null,"size":788,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42"},"html":{"href":"https://github.com/NikitaSedyx/todo-list/pull/42"},"issue":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/42"},"comments":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/NikitaSedyx/todo-list/statuses/f52f690e5687ae2bf56c7530216cf8db991ec8f3"}}}}