{"action":"created","comment":{"url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/comments/77053467","id":77053467,"diff_hunk":"@@ -1,35 +1,56 @@\n-angular.module('services') \n-\t.service('EmployeeService', ['$http', '$q', function($http, $q) {\n-\t\n-\tthis.getEmployees = function() {\n-\t\t\t\tvar deferred = $q.defer();\n-\t\t\t\t\n-\t\t\t\t$http.get('/employees/')\n-\t\t\t\t\t .then(function(response) {\n-\t\t\t\t\t\t if (response.status == 200) {\n-\t\t\t\t\t\t\t deferred.resolve(response.data);\n-\t\t\t\t\t\t }\n-\t\t\t\t\t\t else {\n-\t\t\t\t\t\t\t deferred.reject('Error retrieving list of documents');\n-\t\t\t\t\t\t }\n-\t\t\t\t\t });\n-\t\t\t\t\n-\t\t\t\treturn deferred.promise;\t\t\t\t\t \n-\t\t\t};\n-\t\t\t\n-\tthis.getEmployee = function(id) {\n-\t\t\t\tvar deferred = $q.defer();\n-\t\t\t\t\n-\t\t\t\t$http.get('/employees/' + id)\n-\t\t\t\t\t .then(function(response) {\n-\t\t\t\t\t\t if (response.status == 200) {\n-\t\t\t\t\t\t\t deferred.resolve(response.data);\n-\t\t\t\t\t\t }\n-\t\t\t\t\t\t else {\n-\t\t\t\t\t\t\t deferred.reject('Error retrieving list of documents');\n-\t\t\t\t\t\t }\n-\t\t\t\t\t });\n-\t\t\t\t\n-\t\t\t\treturn deferred.promise;\t\t\t\t\t \n-\t\t\t};\n-}])\n\\ No newline at end of file\n+angular.module('services')\n+\t.service('EmployeeService', ['$http','$q', function ($http, $q) {\n+\n+\t\tthis.getUserProjects = function (projectId) {\n+\t\t\tvar deferred = $q.defer();\n+\n+\t\t\t$http.get('/employee', { params: { projectId: projectId } })\n+\t\t\t\t.then(function (response) {\n+\n+\t\t\t\t\tdeferred.resolve(response.data);\n+\n+\t\t\t\t}, function (error) {\n+\n+\t\t\t\t\tdeferred.reject('Error retrieving list of documents');\n+\t\t\t\t});\n+\n+\t\t\treturn deferred.promise;\n+\t\t};\n+\n+\n+\n+\t\tthis.getEmployees = function() {\n+\t\t\tvar deferred = $q.defer();\n+\n+\t\t\t$http.get('/employees/')\n+\t\t\t\t.then(function(response) {\n+\t\t\t\t\tif (response.status == 200) {\n+\t\t\t\t\t\tdeferred.resolve(response.data);\n+\t\t\t\t\t}\n+\t\t\t\t\telse {\n+\t\t\t\t\t\tdeferred.reject('Error retrieving list of documents');\n+\t\t\t\t\t}\n+\t\t\t\t});\n+\n+\t\t\treturn deferred.promise;\n+\t\t};\n+\n+\t\tthis.getEmployee = function(id) {\n+\t\t\tvar deferred = $q.defer();\n+\n+\t\t\t$http.get('/employees/' + id)\n+\t\t\t\t.then(function(response) {\n+\t\t\t\t\tif (response.status == 200) {\n+\t\t\t\t\t}\n+\t\t\t\t\telse {\n+\t\t\t\t\t\tdeferred.reject('Error retrieving list of documents');\n+\t\t\t\t\t}\n+\t\t\t\t});","path":"src/main/resources/static/js/services/employeeService.js","position":69,"original_position":84,"commit_id":"788034d5abdffe776688bd406de76ac617ebfa8f","original_commit_id":"788034d5abdffe776688bd406de76ac617ebfa8f","user":{"login":"denis-rodionov","id":11442918,"avatar_url":"https://avatars.githubusercontent.com/u/11442918?v=3","gravatar_id":"","url":"https://api.github.com/users/denis-rodionov","html_url":"https://github.com/denis-rodionov","followers_url":"https://api.github.com/users/denis-rodionov/followers","following_url":"https://api.github.com/users/denis-rodionov/following{/other_user}","gists_url":"https://api.github.com/users/denis-rodionov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-rodionov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-rodionov/subscriptions","organizations_url":"https://api.github.com/users/denis-rodionov/orgs","repos_url":"https://api.github.com/users/denis-rodionov/repos","events_url":"https://api.github.com/users/denis-rodionov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-rodionov/received_events","type":"User","site_admin":false},"body":"Что будет если запрос вернёт ошибку?","created_at":"2016-08-31T19:12:33Z","updated_at":"2016-08-31T19:12:33Z","html_url":"https://github.com/denis-rodionov/cityoffice/pull/12#discussion_r77053467","pull_request_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/comments/77053467"},"html":{"href":"https://github.com/denis-rodionov/cityoffice/pull/12#discussion_r77053467"},"pull_request":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12","id":82106799,"html_url":"https://github.com/denis-rodionov/cityoffice/pull/12","diff_url":"https://github.com/denis-rodionov/cityoffice/pull/12.diff","patch_url":"https://github.com/denis-rodionov/cityoffice/pull/12.patch","issue_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/12","number":12,"state":"open","locked":false,"title":"Feature/11 projects view","user":{"login":"georgekonyaev","id":20405541,"avatar_url":"https://avatars.githubusercontent.com/u/20405541?v=3","gravatar_id":"","url":"https://api.github.com/users/georgekonyaev","html_url":"https://github.com/georgekonyaev","followers_url":"https://api.github.com/users/georgekonyaev/followers","following_url":"https://api.github.com/users/georgekonyaev/following{/other_user}","gists_url":"https://api.github.com/users/georgekonyaev/gists{/gist_id}","starred_url":"https://api.github.com/users/georgekonyaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgekonyaev/subscriptions","organizations_url":"https://api.github.com/users/georgekonyaev/orgs","repos_url":"https://api.github.com/users/georgekonyaev/repos","events_url":"https://api.github.com/users/georgekonyaev/events{/privacy}","received_events_url":"https://api.github.com/users/georgekonyaev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-21T14:17:54Z","updated_at":"2016-08-31T19:12:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78b38d20d3c58fd9c5868b4d1b341d6539c303f6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12/commits","review_comments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12/comments","review_comment_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/12/comments","statuses_url":"https://api.github.com/repos/denis-rodionov/cityoffice/statuses/788034d5abdffe776688bd406de76ac617ebfa8f","head":{"label":"denis-rodionov:feature/11-projects-view","ref":"feature/11-projects-view","sha":"788034d5abdffe776688bd406de76ac617ebfa8f","user":{"login":"denis-rodionov","id":11442918,"avatar_url":"https://avatars.githubusercontent.com/u/11442918?v=3","gravatar_id":"","url":"https://api.github.com/users/denis-rodionov","html_url":"https://github.com/denis-rodionov","followers_url":"https://api.github.com/users/denis-rodionov/followers","following_url":"https://api.github.com/users/denis-rodionov/following{/other_user}","gists_url":"https://api.github.com/users/denis-rodionov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-rodionov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-rodionov/subscriptions","organizations_url":"https://api.github.com/users/denis-rodionov/orgs","repos_url":"https://api.github.com/users/denis-rodionov/repos","events_url":"https://api.github.com/users/denis-rodionov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-rodionov/received_events","type":"User","site_admin":false},"repo":{"id":55007395,"name":"cityoffice","full_name":"denis-rodionov/cityoffice","owner":{"login":"denis-rodionov","id":11442918,"avatar_url":"https://avatars.githubusercontent.com/u/11442918?v=3","gravatar_id":"","url":"https://api.github.com/users/denis-rodionov","html_url":"https://github.com/denis-rodionov","followers_url":"https://api.github.com/users/denis-rodionov/followers","following_url":"https://api.github.com/users/denis-rodionov/following{/other_user}","gists_url":"https://api.github.com/users/denis-rodionov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-rodionov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-rodionov/subscriptions","organizations_url":"https://api.github.com/users/denis-rodionov/orgs","repos_url":"https://api.github.com/users/denis-rodionov/repos","events_url":"https://api.github.com/users/denis-rodionov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-rodionov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/denis-rodionov/cityoffice","description":"Staging:","fork":false,"url":"https://api.github.com/repos/denis-rodionov/cityoffice","forks_url":"https://api.github.com/repos/denis-rodionov/cityoffice/forks","keys_url":"https://api.github.com/repos/denis-rodionov/cityoffice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denis-rodionov/cityoffice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denis-rodionov/cityoffice/teams","hooks_url":"https://api.github.com/repos/denis-rodionov/cityoffice/hooks","issue_events_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/events{/number}","events_url":"https://api.github.com/repos/denis-rodionov/cityoffice/events","assignees_url":"https://api.github.com/repos/denis-rodionov/cityoffice/assignees{/user}","branches_url":"https://api.github.com/repos/denis-rodionov/cityoffice/branches{/branch}","tags_url":"https://api.github.com/repos/denis-rodionov/cityoffice/tags","blobs_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/refs{/sha}","trees_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denis-rodionov/cityoffice/statuses/{sha}","languages_url":"https://api.github.com/repos/denis-rodionov/cityoffice/languages","stargazers_url":"https://api.github.com/repos/denis-rodionov/cityoffice/stargazers","contributors_url":"https://api.github.com/repos/denis-rodionov/cityoffice/contributors","subscribers_url":"https://api.github.com/repos/denis-rodionov/cityoffice/subscribers","subscription_url":"https://api.github.com/repos/denis-rodionov/cityoffice/subscription","commits_url":"https://api.github.com/repos/denis-rodionov/cityoffice/commits{/sha}","git_commits_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/commits{/sha}","comments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/comments{/number}","issue_comment_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/comments{/number}","contents_url":"https://api.github.com/repos/denis-rodionov/cityoffice/contents/{+path}","compare_url":"https://api.github.com/repos/denis-rodionov/cityoffice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denis-rodionov/cityoffice/merges","archive_url":"https://api.github.com/repos/denis-rodionov/cityoffice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denis-rodionov/cityoffice/downloads","issues_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues{/number}","pulls_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls{/number}","milestones_url":"https://api.github.com/repos/denis-rodionov/cityoffice/milestones{/number}","notifications_url":"https://api.github.com/repos/denis-rodionov/cityoffice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denis-rodionov/cityoffice/labels{/name}","releases_url":"https://api.github.com/repos/denis-rodionov/cityoffice/releases{/id}","deployments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/deployments","created_at":"2016-03-29T20:12:38Z","updated_at":"2016-08-23T20:18:48Z","pushed_at":"2016-08-31T15:33:55Z","git_url":"git://github.com/denis-rodionov/cityoffice.git","ssh_url":"git@github.com:denis-rodionov/cityoffice.git","clone_url":"https://github.com/denis-rodionov/cityoffice.git","svn_url":"https://github.com/denis-rodionov/cityoffice","homepage":"https://cityoffice.herokuapp.com/index.html#/","size":5828,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"base":{"label":"denis-rodionov:develop","ref":"develop","sha":"e002b31f14bc0b30f2919adbcd6e0f50da66a6de","user":{"login":"denis-rodionov","id":11442918,"avatar_url":"https://avatars.githubusercontent.com/u/11442918?v=3","gravatar_id":"","url":"https://api.github.com/users/denis-rodionov","html_url":"https://github.com/denis-rodionov","followers_url":"https://api.github.com/users/denis-rodionov/followers","following_url":"https://api.github.com/users/denis-rodionov/following{/other_user}","gists_url":"https://api.github.com/users/denis-rodionov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-rodionov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-rodionov/subscriptions","organizations_url":"https://api.github.com/users/denis-rodionov/orgs","repos_url":"https://api.github.com/users/denis-rodionov/repos","events_url":"https://api.github.com/users/denis-rodionov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-rodionov/received_events","type":"User","site_admin":false},"repo":{"id":55007395,"name":"cityoffice","full_name":"denis-rodionov/cityoffice","owner":{"login":"denis-rodionov","id":11442918,"avatar_url":"https://avatars.githubusercontent.com/u/11442918?v=3","gravatar_id":"","url":"https://api.github.com/users/denis-rodionov","html_url":"https://github.com/denis-rodionov","followers_url":"https://api.github.com/users/denis-rodionov/followers","following_url":"https://api.github.com/users/denis-rodionov/following{/other_user}","gists_url":"https://api.github.com/users/denis-rodionov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-rodionov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-rodionov/subscriptions","organizations_url":"https://api.github.com/users/denis-rodionov/orgs","repos_url":"https://api.github.com/users/denis-rodionov/repos","events_url":"https://api.github.com/users/denis-rodionov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-rodionov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/denis-rodionov/cityoffice","description":"Staging:","fork":false,"url":"https://api.github.com/repos/denis-rodionov/cityoffice","forks_url":"https://api.github.com/repos/denis-rodionov/cityoffice/forks","keys_url":"https://api.github.com/repos/denis-rodionov/cityoffice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denis-rodionov/cityoffice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denis-rodionov/cityoffice/teams","hooks_url":"https://api.github.com/repos/denis-rodionov/cityoffice/hooks","issue_events_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/events{/number}","events_url":"https://api.github.com/repos/denis-rodionov/cityoffice/events","assignees_url":"https://api.github.com/repos/denis-rodionov/cityoffice/assignees{/user}","branches_url":"https://api.github.com/repos/denis-rodionov/cityoffice/branches{/branch}","tags_url":"https://api.github.com/repos/denis-rodionov/cityoffice/tags","blobs_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/refs{/sha}","trees_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denis-rodionov/cityoffice/statuses/{sha}","languages_url":"https://api.github.com/repos/denis-rodionov/cityoffice/languages","stargazers_url":"https://api.github.com/repos/denis-rodionov/cityoffice/stargazers","contributors_url":"https://api.github.com/repos/denis-rodionov/cityoffice/contributors","subscribers_url":"https://api.github.com/repos/denis-rodionov/cityoffice/subscribers","subscription_url":"https://api.github.com/repos/denis-rodionov/cityoffice/subscription","commits_url":"https://api.github.com/repos/denis-rodionov/cityoffice/commits{/sha}","git_commits_url":"https://api.github.com/repos/denis-rodionov/cityoffice/git/commits{/sha}","comments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/comments{/number}","issue_comment_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/comments{/number}","contents_url":"https://api.github.com/repos/denis-rodionov/cityoffice/contents/{+path}","compare_url":"https://api.github.com/repos/denis-rodionov/cityoffice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denis-rodionov/cityoffice/merges","archive_url":"https://api.github.com/repos/denis-rodionov/cityoffice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denis-rodionov/cityoffice/downloads","issues_url":"https://api.github.com/repos/denis-rodionov/cityoffice/issues{/number}","pulls_url":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls{/number}","milestones_url":"https://api.github.com/repos/denis-rodionov/cityoffice/milestones{/number}","notifications_url":"https://api.github.com/repos/denis-rodionov/cityoffice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denis-rodionov/cityoffice/labels{/name}","releases_url":"https://api.github.com/repos/denis-rodionov/cityoffice/releases{/id}","deployments_url":"https://api.github.com/repos/denis-rodionov/cityoffice/deployments","created_at":"2016-03-29T20:12:38Z","updated_at":"2016-08-23T20:18:48Z","pushed_at":"2016-08-31T15:33:55Z","git_url":"git://github.com/denis-rodionov/cityoffice.git","ssh_url":"git@github.com:denis-rodionov/cityoffice.git","clone_url":"https://github.com/denis-rodionov/cityoffice.git","svn_url":"https://github.com/denis-rodionov/cityoffice","homepage":"https://cityoffice.herokuapp.com/index.html#/","size":5828,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12"},"html":{"href":"https://github.com/denis-rodionov/cityoffice/pull/12"},"issue":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/12"},"comments":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/denis-rodionov/cityoffice/statuses/788034d5abdffe776688bd406de76ac617ebfa8f"}}}}
{"actor":{"display_login":"denis-rodionov"}}