{"action":"created","comment":{"url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/comments/55479605","id":55479605,"diff_hunk":"@@ -2,47 +2,26 @@\n  * Created by yuyin on 2016/3/4.\n  */\n Template.createRoom.helpers({\n-    users: function () {\n-    return Meteor.users.find({_id: {$ne: Meteor.userId()}});\n-},\n+  users: ()=>Meteor.users.find({_id: {$ne: Meteor.userId()}})\n });\n Template.createRoom.events({\n-    \"click .confirm\": function () {\n-        //todo:clean this code\n-        var privateRoom = document.querySelector('input[name=access]:checked').value;\n-        var selectedMemberIds=document.querySelector('select').selectedOptions;\n-        var memberIds = _.map(selectedMemberIds,function(selectedMemberIds){\n-            return selectedMemberIds.value;\n-        });\n-        memberIds.push(Meteor.userId());\n-        if(privateRoom==='private'){\n-            privateRoom = true;\n-        }else{\n-            privateRoom = false;\n-        }\n-        Meteor.call(\"addRoom\", document.getElementById(\"roomName\").value,privateRoom,memberIds,function(error,result){\n-            FlowRouter.go('/rooms/'+result);\n-        });\n-    },\n-    \"click .cancel\": function () {\n-        FlowRouter.go('home');\n-    },\n-    \"submit .new-room\": function (event) {\n-        event.preventDefault();\n-        var text = event.target.text.value;\n-        var privateRoom = document.querySelector('input[name=access]:checked').value;\n-        var selectedMemberIds=document.querySelector('select').selectedOptions;\n-        var memberIds = _.map(selectedMemberIds,function(selectedMemberIds){\n-            return selectedMemberIds.value;\n-        });\n-        memberIds.push(Meteor.userId());\n-        if(privateRoom==='private'){\n-            privateRoom = true;\n-        }else{\n-            privateRoom = false;\n-        }\n-        Meteor.call(\"addRoom\", text,privateRoom,memberIds,function(error,result){\n-            FlowRouter.go('/rooms/'+result);\n-        });\n-    },\n-})\n\\ No newline at end of file\n+  \"click .confirm\": function () {\n+    let privateRoom = document.querySelector('input[name=access]:checked').value;\n+    let selectedMemberIds = document.querySelector('select').selectedOptions;\n+    let memberIds = _.map(selectedMemberIds,selectedMemberIds=>selectedMemberIds.value);\n+    memberIds.push(Meteor.userId());\n+    privateRoom = privateRoom === 'private';\n+    Meteor.call(\"addRoom\", document.getElementById(\"roomName\").value, privateRoom, memberIds, (error, result)=>FlowRouter.go(`/rooms/${result}`));","path":"client/CreateRoom.js","position":56,"original_position":56,"commit_id":"7aa6130a9c5a351f8e338d05730905582b4ecaa1","original_commit_id":"7aa6130a9c5a351f8e338d05730905582b4ecaa1","user":{"login":"exKAZUu","id":436237,"avatar_url":"https://avatars.githubusercontent.com/u/436237?v=3","gravatar_id":"","url":"https://api.github.com/users/exKAZUu","html_url":"https://github.com/exKAZUu","followers_url":"https://api.github.com/users/exKAZUu/followers","following_url":"https://api.github.com/users/exKAZUu/following{/other_user}","gists_url":"https://api.github.com/users/exKAZUu/gists{/gist_id}","starred_url":"https://api.github.com/users/exKAZUu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exKAZUu/subscriptions","organizations_url":"https://api.github.com/users/exKAZUu/orgs","repos_url":"https://api.github.com/users/exKAZUu/repos","events_url":"https://api.github.com/users/exKAZUu/events{/privacy}","received_events_url":"https://api.github.com/users/exKAZUu/received_events","type":"User","site_admin":false},"body":"This `=>` is OK (it may be difficult to distinguish good / bad usage)","created_at":"2016-03-09T07:14:41Z","updated_at":"2016-03-09T07:14:41Z","html_url":"https://github.com/WillingRing/SimpleChatYuyin/pull/18#discussion_r55479605","pull_request_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/comments/55479605"},"html":{"href":"https://github.com/WillingRing/SimpleChatYuyin/pull/18#discussion_r55479605"},"pull_request":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18","id":62187503,"html_url":"https://github.com/WillingRing/SimpleChatYuyin/pull/18","diff_url":"https://github.com/WillingRing/SimpleChatYuyin/pull/18.diff","patch_url":"https://github.com/WillingRing/SimpleChatYuyin/pull/18.patch","issue_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/18","number":18,"state":"open","locked":false,"title":"Use ES6 and Apply ESLint and remove all errors and warnings Close #4 Close #17","user":{"login":"CaptainYANG","id":9468907,"avatar_url":"https://avatars.githubusercontent.com/u/9468907?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainYANG","html_url":"https://github.com/CaptainYANG","followers_url":"https://api.github.com/users/CaptainYANG/followers","following_url":"https://api.github.com/users/CaptainYANG/following{/other_user}","gists_url":"https://api.github.com/users/CaptainYANG/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainYANG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainYANG/subscriptions","organizations_url":"https://api.github.com/users/CaptainYANG/orgs","repos_url":"https://api.github.com/users/CaptainYANG/repos","events_url":"https://api.github.com/users/CaptainYANG/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainYANG/received_events","type":"User","site_admin":false},"body":"#4 #16 #17 ","created_at":"2016-03-09T06:59:53Z","updated_at":"2016-03-09T07:14:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ff150bc34afdd0a765ac2961ba55ae6b4e572a2","assignee":{"login":"ss0201","id":1684202,"avatar_url":"https://avatars.githubusercontent.com/u/1684202?v=3","gravatar_id":"","url":"https://api.github.com/users/ss0201","html_url":"https://github.com/ss0201","followers_url":"https://api.github.com/users/ss0201/followers","following_url":"https://api.github.com/users/ss0201/following{/other_user}","gists_url":"https://api.github.com/users/ss0201/gists{/gist_id}","starred_url":"https://api.github.com/users/ss0201/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ss0201/subscriptions","organizations_url":"https://api.github.com/users/ss0201/orgs","repos_url":"https://api.github.com/users/ss0201/repos","events_url":"https://api.github.com/users/ss0201/events{/privacy}","received_events_url":"https://api.github.com/users/ss0201/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18/commits","review_comments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18/comments","review_comment_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/18/comments","statuses_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/statuses/7aa6130a9c5a351f8e338d05730905582b4ecaa1","head":{"label":"WillingRing:4_ES2015","ref":"4_ES2015","sha":"7aa6130a9c5a351f8e338d05730905582b4ecaa1","user":{"login":"WillingRing","id":7263633,"avatar_url":"https://avatars.githubusercontent.com/u/7263633?v=3","gravatar_id":"","url":"https://api.github.com/users/WillingRing","html_url":"https://github.com/WillingRing","followers_url":"https://api.github.com/users/WillingRing/followers","following_url":"https://api.github.com/users/WillingRing/following{/other_user}","gists_url":"https://api.github.com/users/WillingRing/gists{/gist_id}","starred_url":"https://api.github.com/users/WillingRing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillingRing/subscriptions","organizations_url":"https://api.github.com/users/WillingRing/orgs","repos_url":"https://api.github.com/users/WillingRing/repos","events_url":"https://api.github.com/users/WillingRing/events{/privacy}","received_events_url":"https://api.github.com/users/WillingRing/received_events","type":"Organization","site_admin":false},"repo":{"id":52923365,"name":"SimpleChatYuyin","full_name":"WillingRing/SimpleChatYuyin","owner":{"login":"WillingRing","id":7263633,"avatar_url":"https://avatars.githubusercontent.com/u/7263633?v=3","gravatar_id":"","url":"https://api.github.com/users/WillingRing","html_url":"https://github.com/WillingRing","followers_url":"https://api.github.com/users/WillingRing/followers","following_url":"https://api.github.com/users/WillingRing/following{/other_user}","gists_url":"https://api.github.com/users/WillingRing/gists{/gist_id}","starred_url":"https://api.github.com/users/WillingRing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillingRing/subscriptions","organizations_url":"https://api.github.com/users/WillingRing/orgs","repos_url":"https://api.github.com/users/WillingRing/repos","events_url":"https://api.github.com/users/WillingRing/events{/privacy}","received_events_url":"https://api.github.com/users/WillingRing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WillingRing/SimpleChatYuyin","description":"","fork":false,"url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin","forks_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/forks","keys_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/teams","hooks_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/hooks","issue_events_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/events{/number}","events_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/events","assignees_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/assignees{/user}","branches_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/branches{/branch}","tags_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/tags","blobs_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/refs{/sha}","trees_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/statuses/{sha}","languages_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/languages","stargazers_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/stargazers","contributors_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/contributors","subscribers_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/subscribers","subscription_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/subscription","commits_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/commits{/sha}","git_commits_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/commits{/sha}","comments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/comments{/number}","issue_comment_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/comments{/number}","contents_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/contents/{+path}","compare_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/merges","archive_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/downloads","issues_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues{/number}","pulls_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls{/number}","milestones_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/milestones{/number}","notifications_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/labels{/name}","releases_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/releases{/id}","deployments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/deployments","created_at":"2016-03-02T01:25:59Z","updated_at":"2016-03-07T06:49:47Z","pushed_at":"2016-03-09T06:59:53Z","git_url":"git://github.com/WillingRing/SimpleChatYuyin.git","ssh_url":"git@github.com:WillingRing/SimpleChatYuyin.git","clone_url":"https://github.com/WillingRing/SimpleChatYuyin.git","svn_url":"https://github.com/WillingRing/SimpleChatYuyin","homepage":null,"size":58,"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":"WillingRing:master","ref":"master","sha":"d74c4ad1f607bb4ca08ade5cda4af9452a646dc2","user":{"login":"WillingRing","id":7263633,"avatar_url":"https://avatars.githubusercontent.com/u/7263633?v=3","gravatar_id":"","url":"https://api.github.com/users/WillingRing","html_url":"https://github.com/WillingRing","followers_url":"https://api.github.com/users/WillingRing/followers","following_url":"https://api.github.com/users/WillingRing/following{/other_user}","gists_url":"https://api.github.com/users/WillingRing/gists{/gist_id}","starred_url":"https://api.github.com/users/WillingRing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillingRing/subscriptions","organizations_url":"https://api.github.com/users/WillingRing/orgs","repos_url":"https://api.github.com/users/WillingRing/repos","events_url":"https://api.github.com/users/WillingRing/events{/privacy}","received_events_url":"https://api.github.com/users/WillingRing/received_events","type":"Organization","site_admin":false},"repo":{"id":52923365,"name":"SimpleChatYuyin","full_name":"WillingRing/SimpleChatYuyin","owner":{"login":"WillingRing","id":7263633,"avatar_url":"https://avatars.githubusercontent.com/u/7263633?v=3","gravatar_id":"","url":"https://api.github.com/users/WillingRing","html_url":"https://github.com/WillingRing","followers_url":"https://api.github.com/users/WillingRing/followers","following_url":"https://api.github.com/users/WillingRing/following{/other_user}","gists_url":"https://api.github.com/users/WillingRing/gists{/gist_id}","starred_url":"https://api.github.com/users/WillingRing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillingRing/subscriptions","organizations_url":"https://api.github.com/users/WillingRing/orgs","repos_url":"https://api.github.com/users/WillingRing/repos","events_url":"https://api.github.com/users/WillingRing/events{/privacy}","received_events_url":"https://api.github.com/users/WillingRing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WillingRing/SimpleChatYuyin","description":"","fork":false,"url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin","forks_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/forks","keys_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/teams","hooks_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/hooks","issue_events_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/events{/number}","events_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/events","assignees_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/assignees{/user}","branches_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/branches{/branch}","tags_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/tags","blobs_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/refs{/sha}","trees_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/statuses/{sha}","languages_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/languages","stargazers_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/stargazers","contributors_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/contributors","subscribers_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/subscribers","subscription_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/subscription","commits_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/commits{/sha}","git_commits_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/git/commits{/sha}","comments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/comments{/number}","issue_comment_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/comments{/number}","contents_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/contents/{+path}","compare_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/merges","archive_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/downloads","issues_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues{/number}","pulls_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls{/number}","milestones_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/milestones{/number}","notifications_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/labels{/name}","releases_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/releases{/id}","deployments_url":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/deployments","created_at":"2016-03-02T01:25:59Z","updated_at":"2016-03-07T06:49:47Z","pushed_at":"2016-03-09T06:59:53Z","git_url":"git://github.com/WillingRing/SimpleChatYuyin.git","ssh_url":"git@github.com:WillingRing/SimpleChatYuyin.git","clone_url":"https://github.com/WillingRing/SimpleChatYuyin.git","svn_url":"https://github.com/WillingRing/SimpleChatYuyin","homepage":null,"size":58,"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/WillingRing/SimpleChatYuyin/pulls/18"},"html":{"href":"https://github.com/WillingRing/SimpleChatYuyin/pull/18"},"issue":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/18"},"comments":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/WillingRing/SimpleChatYuyin/statuses/7aa6130a9c5a351f8e338d05730905582b4ecaa1"}}}}