{"action":"created","comment":{"url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/comments/167060956","pull_request_review_id":95225172,"id":167060956,"diff_hunk":"@@ -0,0 +1,92 @@\n+package controllers;\n+\n+import forms.LoginForm;\n+import forms.RegisterForm;\n+import models.User;\n+import play.data.Form;\n+import play.data.FormFactory;\n+import play.db.jpa.Transactional;\n+import play.libs.Json;\n+import play.mvc.Result;\n+import services.UserService;\n+\n+import javax.inject.Inject;\n+\n+public class UserController extends BaseController {\n+\n+    private UserService userService;\n+    private FormFactory formFactory;\n+\n+    @Inject\n+    public void setUserService(UserService userService) {\n+        this.userService = userService;\n+    }\n+\n+    @Inject\n+    public void setFormFactory(FormFactory formFactory) {\n+        this.formFactory = formFactory;\n+    }\n+\n+    @Transactional\n+    public Result register() {\n+        try {\n+            Form<RegisterForm> registerForm = formFactory.form(RegisterForm.class);\n+\n+            User user = userService.register(registerForm.bindFromRequest().get());\n+\n+            setToken(user);\n+\n+            return ok(Json.toJson(user));\n+        }\n+        catch(Exception e) {\n+            return badRequest(e.getMessage());\n+        }\n+    }\n+\n+    @Transactional","path":"app/controllers/UserController.java","position":46,"original_position":46,"commit_id":"161908de9269c1375a6a87d7922100161290bbdd","original_commit_id":"161908de9269c1375a6a87d7922100161290bbdd","user":{"login":"dinopraso","id":25632420,"avatar_url":"https://avatars2.githubusercontent.com/u/25632420?v=4","gravatar_id":"","url":"https://api.github.com/users/dinopraso","html_url":"https://github.com/dinopraso","followers_url":"https://api.github.com/users/dinopraso/followers","following_url":"https://api.github.com/users/dinopraso/following{/other_user}","gists_url":"https://api.github.com/users/dinopraso/gists{/gist_id}","starred_url":"https://api.github.com/users/dinopraso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinopraso/subscriptions","organizations_url":"https://api.github.com/users/dinopraso/orgs","repos_url":"https://api.github.com/users/dinopraso/repos","events_url":"https://api.github.com/users/dinopraso/events{/privacy}","received_events_url":"https://api.github.com/users/dinopraso/received_events","type":"User","site_admin":false},"body":"read-only","created_at":"2018-02-08T20:41:08Z","updated_at":"2018-02-08T20:41:08Z","html_url":"https://github.com/redaner/Java-Ember-Auctions/pull/3#discussion_r167060956","pull_request_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/comments/167060956"},"html":{"href":"https://github.com/redaner/Java-Ember-Auctions/pull/3#discussion_r167060956"},"pull_request":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3","id":167035275,"html_url":"https://github.com/redaner/Java-Ember-Auctions/pull/3","diff_url":"https://github.com/redaner/Java-Ember-Auctions/pull/3.diff","patch_url":"https://github.com/redaner/Java-Ember-Auctions/pull/3.patch","issue_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/3","number":3,"state":"open","locked":false,"title":"ABHP-0003: Login & Registration","user":{"login":"redaner","id":23560736,"avatar_url":"https://avatars0.githubusercontent.com/u/23560736?v=4","gravatar_id":"","url":"https://api.github.com/users/redaner","html_url":"https://github.com/redaner","followers_url":"https://api.github.com/users/redaner/followers","following_url":"https://api.github.com/users/redaner/following{/other_user}","gists_url":"https://api.github.com/users/redaner/gists{/gist_id}","starred_url":"https://api.github.com/users/redaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaner/subscriptions","organizations_url":"https://api.github.com/users/redaner/orgs","repos_url":"https://api.github.com/users/redaner/repos","events_url":"https://api.github.com/users/redaner/events{/privacy}","received_events_url":"https://api.github.com/users/redaner/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-04T23:00:00Z","updated_at":"2018-02-08T20:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c23d4826b0cc19768dfc88bc21aa3e68a6a54b1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3/commits","review_comments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3/comments","review_comment_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/3/comments","statuses_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/statuses/161908de9269c1375a6a87d7922100161290bbdd","head":{"label":"redaner:ABHP-0003","ref":"ABHP-0003","sha":"161908de9269c1375a6a87d7922100161290bbdd","user":{"login":"redaner","id":23560736,"avatar_url":"https://avatars0.githubusercontent.com/u/23560736?v=4","gravatar_id":"","url":"https://api.github.com/users/redaner","html_url":"https://github.com/redaner","followers_url":"https://api.github.com/users/redaner/followers","following_url":"https://api.github.com/users/redaner/following{/other_user}","gists_url":"https://api.github.com/users/redaner/gists{/gist_id}","starred_url":"https://api.github.com/users/redaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaner/subscriptions","organizations_url":"https://api.github.com/users/redaner/orgs","repos_url":"https://api.github.com/users/redaner/repos","events_url":"https://api.github.com/users/redaner/events{/privacy}","received_events_url":"https://api.github.com/users/redaner/received_events","type":"User","site_admin":false},"repo":{"id":119537716,"name":"Java-Ember-Auctions","full_name":"redaner/Java-Ember-Auctions","owner":{"login":"redaner","id":23560736,"avatar_url":"https://avatars0.githubusercontent.com/u/23560736?v=4","gravatar_id":"","url":"https://api.github.com/users/redaner","html_url":"https://github.com/redaner","followers_url":"https://api.github.com/users/redaner/followers","following_url":"https://api.github.com/users/redaner/following{/other_user}","gists_url":"https://api.github.com/users/redaner/gists{/gist_id}","starred_url":"https://api.github.com/users/redaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaner/subscriptions","organizations_url":"https://api.github.com/users/redaner/orgs","repos_url":"https://api.github.com/users/redaner/repos","events_url":"https://api.github.com/users/redaner/events{/privacy}","received_events_url":"https://api.github.com/users/redaner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/redaner/Java-Ember-Auctions","description":"Atlantbh internship project","fork":false,"url":"https://api.github.com/repos/redaner/Java-Ember-Auctions","forks_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/forks","keys_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/teams","hooks_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/hooks","issue_events_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/events{/number}","events_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/events","assignees_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/assignees{/user}","branches_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/branches{/branch}","tags_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/tags","blobs_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/refs{/sha}","trees_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/statuses/{sha}","languages_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/languages","stargazers_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/stargazers","contributors_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/contributors","subscribers_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/subscribers","subscription_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/subscription","commits_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/commits{/sha}","git_commits_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/commits{/sha}","comments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/comments{/number}","issue_comment_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/comments{/number}","contents_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/contents/{+path}","compare_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/merges","archive_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/downloads","issues_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues{/number}","pulls_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls{/number}","milestones_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/milestones{/number}","notifications_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/labels{/name}","releases_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/releases{/id}","deployments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/deployments","created_at":"2018-01-30T13:11:51Z","updated_at":"2018-01-30T13:11:51Z","pushed_at":"2018-02-08T01:33:44Z","git_url":"git://github.com/redaner/Java-Ember-Auctions.git","ssh_url":"git@github.com:redaner/Java-Ember-Auctions.git","clone_url":"https://github.com/redaner/Java-Ember-Auctions.git","svn_url":"https://github.com/redaner/Java-Ember-Auctions","homepage":null,"size":7943,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"redaner:develop","ref":"develop","sha":"06e90c3f1e0d93059fd696f60848406c9135bf3a","user":{"login":"redaner","id":23560736,"avatar_url":"https://avatars0.githubusercontent.com/u/23560736?v=4","gravatar_id":"","url":"https://api.github.com/users/redaner","html_url":"https://github.com/redaner","followers_url":"https://api.github.com/users/redaner/followers","following_url":"https://api.github.com/users/redaner/following{/other_user}","gists_url":"https://api.github.com/users/redaner/gists{/gist_id}","starred_url":"https://api.github.com/users/redaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaner/subscriptions","organizations_url":"https://api.github.com/users/redaner/orgs","repos_url":"https://api.github.com/users/redaner/repos","events_url":"https://api.github.com/users/redaner/events{/privacy}","received_events_url":"https://api.github.com/users/redaner/received_events","type":"User","site_admin":false},"repo":{"id":119537716,"name":"Java-Ember-Auctions","full_name":"redaner/Java-Ember-Auctions","owner":{"login":"redaner","id":23560736,"avatar_url":"https://avatars0.githubusercontent.com/u/23560736?v=4","gravatar_id":"","url":"https://api.github.com/users/redaner","html_url":"https://github.com/redaner","followers_url":"https://api.github.com/users/redaner/followers","following_url":"https://api.github.com/users/redaner/following{/other_user}","gists_url":"https://api.github.com/users/redaner/gists{/gist_id}","starred_url":"https://api.github.com/users/redaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redaner/subscriptions","organizations_url":"https://api.github.com/users/redaner/orgs","repos_url":"https://api.github.com/users/redaner/repos","events_url":"https://api.github.com/users/redaner/events{/privacy}","received_events_url":"https://api.github.com/users/redaner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/redaner/Java-Ember-Auctions","description":"Atlantbh internship project","fork":false,"url":"https://api.github.com/repos/redaner/Java-Ember-Auctions","forks_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/forks","keys_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/teams","hooks_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/hooks","issue_events_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/events{/number}","events_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/events","assignees_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/assignees{/user}","branches_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/branches{/branch}","tags_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/tags","blobs_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/refs{/sha}","trees_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/statuses/{sha}","languages_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/languages","stargazers_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/stargazers","contributors_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/contributors","subscribers_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/subscribers","subscription_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/subscription","commits_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/commits{/sha}","git_commits_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/git/commits{/sha}","comments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/comments{/number}","issue_comment_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/comments{/number}","contents_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/contents/{+path}","compare_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/merges","archive_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/downloads","issues_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues{/number}","pulls_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls{/number}","milestones_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/milestones{/number}","notifications_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/labels{/name}","releases_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/releases{/id}","deployments_url":"https://api.github.com/repos/redaner/Java-Ember-Auctions/deployments","created_at":"2018-01-30T13:11:51Z","updated_at":"2018-01-30T13:11:51Z","pushed_at":"2018-02-08T01:33:44Z","git_url":"git://github.com/redaner/Java-Ember-Auctions.git","ssh_url":"git@github.com:redaner/Java-Ember-Auctions.git","clone_url":"https://github.com/redaner/Java-Ember-Auctions.git","svn_url":"https://github.com/redaner/Java-Ember-Auctions","homepage":null,"size":7943,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3"},"html":{"href":"https://github.com/redaner/Java-Ember-Auctions/pull/3"},"issue":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/3"},"comments":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/redaner/Java-Ember-Auctions/statuses/161908de9269c1375a6a87d7922100161290bbdd"}},"author_association":"OWNER"}}
{"actor":{"display_login":"dinopraso"}}