{"action":"created","comment":{"url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/comments/148457445","pull_request_review_id":73701418,"id":148457445,"diff_hunk":"@@ -52,30 +61,50 @@ export class ListFacade {\n \n             listToInsert.board = await BoardFacade.getById(boardId)\n \n-            return getRepository(List).save(listToInsert)\n+            const list = await getRepository(List).save(listToInsert)\n+\n+            RealTimeFacade.sendEvent(listCreated(list, boardId))\n+            return list\n         } catch (e) {\n-            throw new NotFoundException(e)\n+            console.error(e)\n+            throw new BadRequest(e)\n         }\n     }\n \n     static async update(listId: number, params: {}): Promise<List> {\n         try {\n             const extractor = new ParamsExtractor<List>(params).permit(['name', 'pos'])\n \n-            const list = await ListFacade.getById(listId)\n-            extractor.fill(list)\n+            const listToUpdate = await ListFacade.getById(listId, { relations: ['board'] })\n+            extractor.fill(listToUpdate)\n+            \n+            const board = listToUpdate.board\n+\n+            const list = await getRepository(List).save(listToUpdate)\n+            delete list.board","path":"src/bl/listFacade.ts","position":60,"original_position":60,"commit_id":"008dfdba329bca6cf69514d77294109d353049b3","original_commit_id":"008dfdba329bca6cf69514d77294109d353049b3","user":{"login":"YvesLongchamp","id":15076948,"avatar_url":"https://avatars3.githubusercontent.com/u/15076948?v=4","gravatar_id":"","url":"https://api.github.com/users/YvesLongchamp","html_url":"https://github.com/YvesLongchamp","followers_url":"https://api.github.com/users/YvesLongchamp/followers","following_url":"https://api.github.com/users/YvesLongchamp/following{/other_user}","gists_url":"https://api.github.com/users/YvesLongchamp/gists{/gist_id}","starred_url":"https://api.github.com/users/YvesLongchamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YvesLongchamp/subscriptions","organizations_url":"https://api.github.com/users/YvesLongchamp/orgs","repos_url":"https://api.github.com/users/YvesLongchamp/repos","events_url":"https://api.github.com/users/YvesLongchamp/events{/privacy}","received_events_url":"https://api.github.com/users/YvesLongchamp/received_events","type":"User","site_admin":false},"body":"Why removing the board of the list ? ","created_at":"2017-11-02T07:27:53Z","updated_at":"2017-11-02T07:45:21Z","html_url":"https://github.com/awi2017-option1group1/Prello-back/pull/35#discussion_r148457445","pull_request_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/comments/148457445"},"html":{"href":"https://github.com/awi2017-option1group1/Prello-back/pull/35#discussion_r148457445"},"pull_request":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35","id":150035047,"html_url":"https://github.com/awi2017-option1group1/Prello-back/pull/35","diff_url":"https://github.com/awi2017-option1group1/Prello-back/pull/35.diff","patch_url":"https://github.com/awi2017-option1group1/Prello-back/pull/35.patch","issue_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/35","number":35,"state":"open","locked":false,"title":"Bring RealTime to Prello","user":{"login":"Porquepix","id":8670892,"avatar_url":"https://avatars3.githubusercontent.com/u/8670892?v=4","gravatar_id":"","url":"https://api.github.com/users/Porquepix","html_url":"https://github.com/Porquepix","followers_url":"https://api.github.com/users/Porquepix/followers","following_url":"https://api.github.com/users/Porquepix/following{/other_user}","gists_url":"https://api.github.com/users/Porquepix/gists{/gist_id}","starred_url":"https://api.github.com/users/Porquepix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Porquepix/subscriptions","organizations_url":"https://api.github.com/users/Porquepix/orgs","repos_url":"https://api.github.com/users/Porquepix/repos","events_url":"https://api.github.com/users/Porquepix/events{/privacy}","received_events_url":"https://api.github.com/users/Porquepix/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-01T13:10:47Z","updated_at":"2017-11-02T07:45:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c61563fbf5836ea94e7c018abe2e2244f38cab93","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35/commits","review_comments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35/comments","review_comment_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/comments{/number}","comments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/35/comments","statuses_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/statuses/008dfdba329bca6cf69514d77294109d353049b3","head":{"label":"awi2017-option1group1:alexis/feat/realtime","ref":"alexis/feat/realtime","sha":"008dfdba329bca6cf69514d77294109d353049b3","user":{"login":"awi2017-option1group1","id":32166471,"avatar_url":"https://avatars1.githubusercontent.com/u/32166471?v=4","gravatar_id":"","url":"https://api.github.com/users/awi2017-option1group1","html_url":"https://github.com/awi2017-option1group1","followers_url":"https://api.github.com/users/awi2017-option1group1/followers","following_url":"https://api.github.com/users/awi2017-option1group1/following{/other_user}","gists_url":"https://api.github.com/users/awi2017-option1group1/gists{/gist_id}","starred_url":"https://api.github.com/users/awi2017-option1group1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awi2017-option1group1/subscriptions","organizations_url":"https://api.github.com/users/awi2017-option1group1/orgs","repos_url":"https://api.github.com/users/awi2017-option1group1/repos","events_url":"https://api.github.com/users/awi2017-option1group1/events{/privacy}","received_events_url":"https://api.github.com/users/awi2017-option1group1/received_events","type":"Organization","site_admin":false},"repo":{"id":105139563,"name":"Prello-back","full_name":"awi2017-option1group1/Prello-back","owner":{"login":"awi2017-option1group1","id":32166471,"avatar_url":"https://avatars1.githubusercontent.com/u/32166471?v=4","gravatar_id":"","url":"https://api.github.com/users/awi2017-option1group1","html_url":"https://github.com/awi2017-option1group1","followers_url":"https://api.github.com/users/awi2017-option1group1/followers","following_url":"https://api.github.com/users/awi2017-option1group1/following{/other_user}","gists_url":"https://api.github.com/users/awi2017-option1group1/gists{/gist_id}","starred_url":"https://api.github.com/users/awi2017-option1group1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awi2017-option1group1/subscriptions","organizations_url":"https://api.github.com/users/awi2017-option1group1/orgs","repos_url":"https://api.github.com/users/awi2017-option1group1/repos","events_url":"https://api.github.com/users/awi2017-option1group1/events{/privacy}","received_events_url":"https://api.github.com/users/awi2017-option1group1/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awi2017-option1group1/Prello-back","description":"Prello's back-end application.","fork":false,"url":"https://api.github.com/repos/awi2017-option1group1/Prello-back","forks_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/forks","keys_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/teams","hooks_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/hooks","issue_events_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/events{/number}","events_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/events","assignees_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/assignees{/user}","branches_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/branches{/branch}","tags_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/tags","blobs_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/refs{/sha}","trees_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/statuses/{sha}","languages_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/languages","stargazers_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/stargazers","contributors_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/contributors","subscribers_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/subscribers","subscription_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/subscription","commits_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/commits{/sha}","git_commits_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/commits{/sha}","comments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/comments{/number}","issue_comment_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/comments{/number}","contents_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/contents/{+path}","compare_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/merges","archive_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/downloads","issues_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues{/number}","pulls_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls{/number}","milestones_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/milestones{/number}","notifications_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/labels{/name}","releases_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/releases{/id}","deployments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/deployments","created_at":"2017-09-28T11:21:00Z","updated_at":"2017-10-24T21:46:19Z","pushed_at":"2017-11-02T06:09:51Z","git_url":"git://github.com/awi2017-option1group1/Prello-back.git","ssh_url":"git@github.com:awi2017-option1group1/Prello-back.git","clone_url":"https://github.com/awi2017-option1group1/Prello-back.git","svn_url":"https://github.com/awi2017-option1group1/Prello-back","homepage":null,"size":408,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"awi2017-option1group1:master","ref":"master","sha":"5d429e72052cd13a5102c493d2fa95b9d5db3f9e","user":{"login":"awi2017-option1group1","id":32166471,"avatar_url":"https://avatars1.githubusercontent.com/u/32166471?v=4","gravatar_id":"","url":"https://api.github.com/users/awi2017-option1group1","html_url":"https://github.com/awi2017-option1group1","followers_url":"https://api.github.com/users/awi2017-option1group1/followers","following_url":"https://api.github.com/users/awi2017-option1group1/following{/other_user}","gists_url":"https://api.github.com/users/awi2017-option1group1/gists{/gist_id}","starred_url":"https://api.github.com/users/awi2017-option1group1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awi2017-option1group1/subscriptions","organizations_url":"https://api.github.com/users/awi2017-option1group1/orgs","repos_url":"https://api.github.com/users/awi2017-option1group1/repos","events_url":"https://api.github.com/users/awi2017-option1group1/events{/privacy}","received_events_url":"https://api.github.com/users/awi2017-option1group1/received_events","type":"Organization","site_admin":false},"repo":{"id":105139563,"name":"Prello-back","full_name":"awi2017-option1group1/Prello-back","owner":{"login":"awi2017-option1group1","id":32166471,"avatar_url":"https://avatars1.githubusercontent.com/u/32166471?v=4","gravatar_id":"","url":"https://api.github.com/users/awi2017-option1group1","html_url":"https://github.com/awi2017-option1group1","followers_url":"https://api.github.com/users/awi2017-option1group1/followers","following_url":"https://api.github.com/users/awi2017-option1group1/following{/other_user}","gists_url":"https://api.github.com/users/awi2017-option1group1/gists{/gist_id}","starred_url":"https://api.github.com/users/awi2017-option1group1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awi2017-option1group1/subscriptions","organizations_url":"https://api.github.com/users/awi2017-option1group1/orgs","repos_url":"https://api.github.com/users/awi2017-option1group1/repos","events_url":"https://api.github.com/users/awi2017-option1group1/events{/privacy}","received_events_url":"https://api.github.com/users/awi2017-option1group1/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/awi2017-option1group1/Prello-back","description":"Prello's back-end application.","fork":false,"url":"https://api.github.com/repos/awi2017-option1group1/Prello-back","forks_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/forks","keys_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/keys{/key_id}","collaborators_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/teams","hooks_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/hooks","issue_events_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/events{/number}","events_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/events","assignees_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/assignees{/user}","branches_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/branches{/branch}","tags_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/tags","blobs_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/refs{/sha}","trees_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/trees{/sha}","statuses_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/statuses/{sha}","languages_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/languages","stargazers_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/stargazers","contributors_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/contributors","subscribers_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/subscribers","subscription_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/subscription","commits_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/commits{/sha}","git_commits_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/git/commits{/sha}","comments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/comments{/number}","issue_comment_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/comments{/number}","contents_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/contents/{+path}","compare_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/compare/{base}...{head}","merges_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/merges","archive_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/downloads","issues_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues{/number}","pulls_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls{/number}","milestones_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/milestones{/number}","notifications_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/labels{/name}","releases_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/releases{/id}","deployments_url":"https://api.github.com/repos/awi2017-option1group1/Prello-back/deployments","created_at":"2017-09-28T11:21:00Z","updated_at":"2017-10-24T21:46:19Z","pushed_at":"2017-11-02T06:09:51Z","git_url":"git://github.com/awi2017-option1group1/Prello-back.git","ssh_url":"git@github.com:awi2017-option1group1/Prello-back.git","clone_url":"https://github.com/awi2017-option1group1/Prello-back.git","svn_url":"https://github.com/awi2017-option1group1/Prello-back","homepage":null,"size":408,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35"},"html":{"href":"https://github.com/awi2017-option1group1/Prello-back/pull/35"},"issue":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/35"},"comments":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/awi2017-option1group1/Prello-back/statuses/008dfdba329bca6cf69514d77294109d353049b3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"YvesLongchamp"}}