{"action":"created","comment":{"url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/comments/69068305","id":69068305,"diff_hunk":"@@ -33,30 +31,29 @@ protected UsersController(final UserService userService) {\n     @RequestMapping(method = RequestMethod.GET)\n     @ResponseStatus(code = HttpStatus.OK)\n     public List<User> get() {\n-        return userService.get();\n+        return userService.getAll();\n     }\n \n     @RequestMapping(path = \"/{id}\", method = RequestMethod.GET)\n     @ResponseStatus(code = HttpStatus.OK)\n     public User getUser(@PathVariable String id) {\n-        return new UserInfo(userService.find(id));\n+        return new UserInfo(userService.findUser(id));\n     }\n \n     @RequestMapping(path = \"/{id}\", method = RequestMethod.PUT)\n     @ResponseStatus(code = HttpStatus.ACCEPTED)\n-    public void updateUser(@PathVariable String id, @RequestBody UserEntity user) {\n-        userService.update(id, user);\n+    public void updateUser(@PathVariable String id, @RequestBody UserInfo user) {\n+        userService.updateUser(id, user);\n     }\n \n-    @RequestMapping(path = \"/seed\", method = RequestMethod.POST)\n-    public void seedData() {\n-        userService.seedData();\n-    }\n-\n-    @RequestMapping(path = \"/addUserToTeam/{id}/{teamId}\", method = RequestMethod.POST)\n+    @RequestMapping(path = \"/{id}/teams\", method = RequestMethod.POST)\n     @ResponseStatus(value = HttpStatus.OK)\n-    public void addUserToTeam(@PathVariable String id, @PathVariable String teamId) {\n-        userService.addUserToTeam(id, teamId);\n+    public void addTeam(@PathVariable String id, @RequestBody UserInfo user) {\n+        if (user.getTeams() == null || user.getTeams().isEmpty()) {\n+            throw new NullPointerException();","path":"service-user/src/main/java/sg/ncl/service/user/web/UsersController.java","position":53,"original_position":53,"commit_id":"8ff809dd9c607a31a4d3ef2f3b27ebe8a75873e8","original_commit_id":"8ff809dd9c607a31a4d3ef2f3b27ebe8a75873e8","user":{"login":"ChrisZhong","id":1946052,"avatar_url":"https://avatars.githubusercontent.com/u/1946052?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisZhong","html_url":"https://github.com/ChrisZhong","followers_url":"https://api.github.com/users/ChrisZhong/followers","following_url":"https://api.github.com/users/ChrisZhong/following{/other_user}","gists_url":"https://api.github.com/users/ChrisZhong/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisZhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisZhong/subscriptions","organizations_url":"https://api.github.com/users/ChrisZhong/orgs","repos_url":"https://api.github.com/users/ChrisZhong/repos","events_url":"https://api.github.com/users/ChrisZhong/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisZhong/received_events","type":"User","site_admin":false},"body":"Please create a new Exception that extends `sg.ncl.common.exception.BadRequestException`","created_at":"2016-06-30T04:38:47Z","updated_at":"2016-06-30T04:38:47Z","html_url":"https://github.com/nus-ncl/services-in-one/pull/25#discussion_r69068305","pull_request_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/comments/69068305"},"html":{"href":"https://github.com/nus-ncl/services-in-one/pull/25#discussion_r69068305"},"pull_request":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25","id":75758222,"html_url":"https://github.com/nus-ncl/services-in-one/pull/25","diff_url":"https://github.com/nus-ncl/services-in-one/pull/25.diff","patch_url":"https://github.com/nus-ncl/services-in-one/pull/25.patch","issue_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/25","number":25,"state":"open","locked":false,"title":"DEV-363","user":{"login":"teye","id":6906654,"avatar_url":"https://avatars.githubusercontent.com/u/6906654?v=3","gravatar_id":"","url":"https://api.github.com/users/teye","html_url":"https://github.com/teye","followers_url":"https://api.github.com/users/teye/followers","following_url":"https://api.github.com/users/teye/following{/other_user}","gists_url":"https://api.github.com/users/teye/gists{/gist_id}","starred_url":"https://api.github.com/users/teye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teye/subscriptions","organizations_url":"https://api.github.com/users/teye/orgs","repos_url":"https://api.github.com/users/teye/repos","events_url":"https://api.github.com/users/teye/events{/privacy}","received_events_url":"https://api.github.com/users/teye/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-06-30T04:21:46Z","updated_at":"2016-06-30T04:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e806c46b8a527620a9cb21f1d9a275ab46d8d73","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25/commits","review_comments_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25/comments","review_comment_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/25/comments","statuses_url":"https://api.github.com/repos/nus-ncl/services-in-one/statuses/8ff809dd9c607a31a4d3ef2f3b27ebe8a75873e8","head":{"label":"nus-ncl:DEV-363","ref":"DEV-363","sha":"8ff809dd9c607a31a4d3ef2f3b27ebe8a75873e8","user":{"login":"nus-ncl","id":15359055,"avatar_url":"https://avatars.githubusercontent.com/u/15359055?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-ncl","html_url":"https://github.com/nus-ncl","followers_url":"https://api.github.com/users/nus-ncl/followers","following_url":"https://api.github.com/users/nus-ncl/following{/other_user}","gists_url":"https://api.github.com/users/nus-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-ncl/subscriptions","organizations_url":"https://api.github.com/users/nus-ncl/orgs","repos_url":"https://api.github.com/users/nus-ncl/repos","events_url":"https://api.github.com/users/nus-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/nus-ncl/received_events","type":"Organization","site_admin":false},"repo":{"id":56112257,"name":"services-in-one","full_name":"nus-ncl/services-in-one","owner":{"login":"nus-ncl","id":15359055,"avatar_url":"https://avatars.githubusercontent.com/u/15359055?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-ncl","html_url":"https://github.com/nus-ncl","followers_url":"https://api.github.com/users/nus-ncl/followers","following_url":"https://api.github.com/users/nus-ncl/following{/other_user}","gists_url":"https://api.github.com/users/nus-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-ncl/subscriptions","organizations_url":"https://api.github.com/users/nus-ncl/orgs","repos_url":"https://api.github.com/users/nus-ncl/repos","events_url":"https://api.github.com/users/nus-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/nus-ncl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nus-ncl/services-in-one","description":"","fork":false,"url":"https://api.github.com/repos/nus-ncl/services-in-one","forks_url":"https://api.github.com/repos/nus-ncl/services-in-one/forks","keys_url":"https://api.github.com/repos/nus-ncl/services-in-one/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nus-ncl/services-in-one/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nus-ncl/services-in-one/teams","hooks_url":"https://api.github.com/repos/nus-ncl/services-in-one/hooks","issue_events_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/events{/number}","events_url":"https://api.github.com/repos/nus-ncl/services-in-one/events","assignees_url":"https://api.github.com/repos/nus-ncl/services-in-one/assignees{/user}","branches_url":"https://api.github.com/repos/nus-ncl/services-in-one/branches{/branch}","tags_url":"https://api.github.com/repos/nus-ncl/services-in-one/tags","blobs_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/refs{/sha}","trees_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nus-ncl/services-in-one/statuses/{sha}","languages_url":"https://api.github.com/repos/nus-ncl/services-in-one/languages","stargazers_url":"https://api.github.com/repos/nus-ncl/services-in-one/stargazers","contributors_url":"https://api.github.com/repos/nus-ncl/services-in-one/contributors","subscribers_url":"https://api.github.com/repos/nus-ncl/services-in-one/subscribers","subscription_url":"https://api.github.com/repos/nus-ncl/services-in-one/subscription","commits_url":"https://api.github.com/repos/nus-ncl/services-in-one/commits{/sha}","git_commits_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/commits{/sha}","comments_url":"https://api.github.com/repos/nus-ncl/services-in-one/comments{/number}","issue_comment_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/comments{/number}","contents_url":"https://api.github.com/repos/nus-ncl/services-in-one/contents/{+path}","compare_url":"https://api.github.com/repos/nus-ncl/services-in-one/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nus-ncl/services-in-one/merges","archive_url":"https://api.github.com/repos/nus-ncl/services-in-one/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nus-ncl/services-in-one/downloads","issues_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues{/number}","pulls_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls{/number}","milestones_url":"https://api.github.com/repos/nus-ncl/services-in-one/milestones{/number}","notifications_url":"https://api.github.com/repos/nus-ncl/services-in-one/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nus-ncl/services-in-one/labels{/name}","releases_url":"https://api.github.com/repos/nus-ncl/services-in-one/releases{/id}","deployments_url":"https://api.github.com/repos/nus-ncl/services-in-one/deployments","created_at":"2016-04-13T01:52:23Z","updated_at":"2016-06-23T02:22:35Z","pushed_at":"2016-06-30T04:31:07Z","git_url":"git://github.com/nus-ncl/services-in-one.git","ssh_url":"git@github.com:nus-ncl/services-in-one.git","clone_url":"https://github.com/nus-ncl/services-in-one.git","svn_url":"https://github.com/nus-ncl/services-in-one","homepage":null,"size":1015,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"nus-ncl:master","ref":"master","sha":"36bf25de02466a7158427f9005414e2867c0cd1e","user":{"login":"nus-ncl","id":15359055,"avatar_url":"https://avatars.githubusercontent.com/u/15359055?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-ncl","html_url":"https://github.com/nus-ncl","followers_url":"https://api.github.com/users/nus-ncl/followers","following_url":"https://api.github.com/users/nus-ncl/following{/other_user}","gists_url":"https://api.github.com/users/nus-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-ncl/subscriptions","organizations_url":"https://api.github.com/users/nus-ncl/orgs","repos_url":"https://api.github.com/users/nus-ncl/repos","events_url":"https://api.github.com/users/nus-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/nus-ncl/received_events","type":"Organization","site_admin":false},"repo":{"id":56112257,"name":"services-in-one","full_name":"nus-ncl/services-in-one","owner":{"login":"nus-ncl","id":15359055,"avatar_url":"https://avatars.githubusercontent.com/u/15359055?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-ncl","html_url":"https://github.com/nus-ncl","followers_url":"https://api.github.com/users/nus-ncl/followers","following_url":"https://api.github.com/users/nus-ncl/following{/other_user}","gists_url":"https://api.github.com/users/nus-ncl/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-ncl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-ncl/subscriptions","organizations_url":"https://api.github.com/users/nus-ncl/orgs","repos_url":"https://api.github.com/users/nus-ncl/repos","events_url":"https://api.github.com/users/nus-ncl/events{/privacy}","received_events_url":"https://api.github.com/users/nus-ncl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nus-ncl/services-in-one","description":"","fork":false,"url":"https://api.github.com/repos/nus-ncl/services-in-one","forks_url":"https://api.github.com/repos/nus-ncl/services-in-one/forks","keys_url":"https://api.github.com/repos/nus-ncl/services-in-one/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nus-ncl/services-in-one/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nus-ncl/services-in-one/teams","hooks_url":"https://api.github.com/repos/nus-ncl/services-in-one/hooks","issue_events_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/events{/number}","events_url":"https://api.github.com/repos/nus-ncl/services-in-one/events","assignees_url":"https://api.github.com/repos/nus-ncl/services-in-one/assignees{/user}","branches_url":"https://api.github.com/repos/nus-ncl/services-in-one/branches{/branch}","tags_url":"https://api.github.com/repos/nus-ncl/services-in-one/tags","blobs_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/refs{/sha}","trees_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nus-ncl/services-in-one/statuses/{sha}","languages_url":"https://api.github.com/repos/nus-ncl/services-in-one/languages","stargazers_url":"https://api.github.com/repos/nus-ncl/services-in-one/stargazers","contributors_url":"https://api.github.com/repos/nus-ncl/services-in-one/contributors","subscribers_url":"https://api.github.com/repos/nus-ncl/services-in-one/subscribers","subscription_url":"https://api.github.com/repos/nus-ncl/services-in-one/subscription","commits_url":"https://api.github.com/repos/nus-ncl/services-in-one/commits{/sha}","git_commits_url":"https://api.github.com/repos/nus-ncl/services-in-one/git/commits{/sha}","comments_url":"https://api.github.com/repos/nus-ncl/services-in-one/comments{/number}","issue_comment_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues/comments{/number}","contents_url":"https://api.github.com/repos/nus-ncl/services-in-one/contents/{+path}","compare_url":"https://api.github.com/repos/nus-ncl/services-in-one/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nus-ncl/services-in-one/merges","archive_url":"https://api.github.com/repos/nus-ncl/services-in-one/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nus-ncl/services-in-one/downloads","issues_url":"https://api.github.com/repos/nus-ncl/services-in-one/issues{/number}","pulls_url":"https://api.github.com/repos/nus-ncl/services-in-one/pulls{/number}","milestones_url":"https://api.github.com/repos/nus-ncl/services-in-one/milestones{/number}","notifications_url":"https://api.github.com/repos/nus-ncl/services-in-one/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nus-ncl/services-in-one/labels{/name}","releases_url":"https://api.github.com/repos/nus-ncl/services-in-one/releases{/id}","deployments_url":"https://api.github.com/repos/nus-ncl/services-in-one/deployments","created_at":"2016-04-13T01:52:23Z","updated_at":"2016-06-23T02:22:35Z","pushed_at":"2016-06-30T04:31:07Z","git_url":"git://github.com/nus-ncl/services-in-one.git","ssh_url":"git@github.com:nus-ncl/services-in-one.git","clone_url":"https://github.com/nus-ncl/services-in-one.git","svn_url":"https://github.com/nus-ncl/services-in-one","homepage":null,"size":1015,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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/nus-ncl/services-in-one/pulls/25"},"html":{"href":"https://github.com/nus-ncl/services-in-one/pull/25"},"issue":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/issues/25"},"comments":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/nus-ncl/services-in-one/statuses/8ff809dd9c607a31a4d3ef2f3b27ebe8a75873e8"}}}}
{"actor":{"display_login":"ChrisZhong"}}