{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/comments/60132109","id":60132109,"diff_hunk":"@@ -22,25 +22,23 @@ const DiscussionForumModel = DiscussionBaseModel.extend(\n \t\tloadPage(pageNum = 0, sortBy = 'trending') {\n \t\t\tthis.set('data.pageNum', pageNum);\n \n-\t\t\treturn ajaxCall({\n+\t\t\treturn this.get('ajax').request(M.getDiscussionServiceUrl(`/${this.wikiId}/forums/${this.forumId}`), {\n \t\t\t\tdata: {\n \t\t\t\t\tpage: this.get('data.pageNum'),\n \t\t\t\t\tpivot: this.get('pivotId'),\n \t\t\t\t\tsortKey: this.getSortKey(sortBy),\n \t\t\t\t\tviewableOnly: false\n-\t\t\t\t},\n-\t\t\t\turl: M.getDiscussionServiceUrl(`/${this.wikiId}/forums/${this.forumId}`),\n-\t\t\t\tsuccess: (data) => {\n-\t\t\t\t\tthis.get('data.entities').pushObjects(\n-\t\t\t\t\t\tEmber.get(data, '_embedded.doc:threads').map(\n-\t\t\t\t\t\t\t(newThread) => DiscussionPost.createFromThreadData(newThread)\n-\t\t\t\t\t\t)\n-\t\t\t\t\t);\n-\t\t\t\t},\n-\t\t\t\terror: (err) => {\n-\t\t\t\t\tthis.handleLoadMoreError(err);\n \t\t\t\t}\n+\t\t\t}).then((data) => {\n+\t\t\t\tthis.get('data.entities').pushObjects(\n+\t\t\t\t\tEmber.get(data, '_embedded.doc:threads').map(\n+\t\t\t\t\t\t(newThread) => DiscussionPost.createFromThreadData(newThread)\n+\t\t\t\t\t)\n+\t\t\t\t);\n+\t\t\t}).catch((err) => {\n+\t\t\t\tthis.handleLoadMoreError(err);","path":"front/main/app/models/discussion/forum.js","position":46,"original_position":46,"commit_id":"3b71210cd71b98fdcf00176c1211d70a39a763b1","original_commit_id":"ed2140130f660c849affa0feebcbec314f9423ba","user":{"login":"rogatty","id":7030884,"avatar_url":"https://avatars.githubusercontent.com/u/7030884?v=3","gravatar_id":"","url":"https://api.github.com/users/rogatty","html_url":"https://github.com/rogatty","followers_url":"https://api.github.com/users/rogatty/followers","following_url":"https://api.github.com/users/rogatty/following{/other_user}","gists_url":"https://api.github.com/users/rogatty/gists{/gist_id}","starred_url":"https://api.github.com/users/rogatty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogatty/subscriptions","organizations_url":"https://api.github.com/users/rogatty/orgs","repos_url":"https://api.github.com/users/rogatty/repos","events_url":"https://api.github.com/users/rogatty/events{/privacy}","received_events_url":"https://api.github.com/users/rogatty/received_events","type":"User","site_admin":false},"body":"`}).catch(this.handleLoadMoreError);`?","created_at":"2016-04-18T20:53:03Z","updated_at":"2016-04-18T20:53:03Z","html_url":"https://github.com/Wikia/mercury/pull/2357#discussion_r60132109","pull_request_url":"https://api.github.com/repos/Wikia/mercury/pulls/2357","_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments/60132109"},"html":{"href":"https://github.com/Wikia/mercury/pull/2357#discussion_r60132109"},"pull_request":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2357"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/mercury/pulls/2357","id":66570616,"html_url":"https://github.com/Wikia/mercury/pull/2357","diff_url":"https://github.com/Wikia/mercury/pull/2357.diff","patch_url":"https://github.com/Wikia/mercury/pull/2357.patch","issue_url":"https://api.github.com/repos/Wikia/mercury/issues/2357","number":2357,"state":"open","locked":false,"title":"XW-904 | Replace $.ajax with ember-ajax","user":{"login":"hakubo","id":1018759,"avatar_url":"https://avatars.githubusercontent.com/u/1018759?v=3","gravatar_id":"","url":"https://api.github.com/users/hakubo","html_url":"https://github.com/hakubo","followers_url":"https://api.github.com/users/hakubo/followers","following_url":"https://api.github.com/users/hakubo/following{/other_user}","gists_url":"https://api.github.com/users/hakubo/gists{/gist_id}","starred_url":"https://api.github.com/users/hakubo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hakubo/subscriptions","organizations_url":"https://api.github.com/users/hakubo/orgs","repos_url":"https://api.github.com/users/hakubo/repos","events_url":"https://api.github.com/users/hakubo/events{/privacy}","received_events_url":"https://api.github.com/users/hakubo/received_events","type":"User","site_admin":false},"body":"## Links\r\n\r\n* https://wikia-inc.atlassian.net/browse/XW-904\r\n* https://github.com/ember-cli/ember-ajax\r\n\r\n## Description\r\n\r\nThis PR prepares us to use Ember Fastboot, but before we get there we need to have a way to call APIs with the same code both on client and server side. Ember ajax has a basic support for that and they are committed to improve that part of the lib. \r\n\r\n\r\n## Reviewers\r\n\r\n@Wikia/x-wing \r\n","created_at":"2016-04-14T23:35:12Z","updated_at":"2016-04-18T20:53:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a0215204d19e4fe563874a4ba081f6988f1535d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/mercury/pulls/2357/commits","review_comments_url":"https://api.github.com/repos/Wikia/mercury/pulls/2357/comments","review_comment_url":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/mercury/issues/2357/comments","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/3b71210cd71b98fdcf00176c1211d70a39a763b1","head":{"label":"Wikia:XW-904","ref":"XW-904","sha":"3b71210cd71b98fdcf00176c1211d70a39a763b1","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-01-11T15:58:43Z","pushed_at":"2016-04-18T20:29:44Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":86790,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":13,"forks":6,"open_issues":13,"watchers":12,"default_branch":"dev"}},"base":{"label":"Wikia:dev","ref":"dev","sha":"9a0430ed29c29fbfeeaf8c2305434a156ebedded","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":16710430,"name":"mercury","full_name":"Wikia/mercury","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/mercury","description":"Wikia Web application","fork":false,"url":"https://api.github.com/repos/Wikia/mercury","forks_url":"https://api.github.com/repos/Wikia/mercury/forks","keys_url":"https://api.github.com/repos/Wikia/mercury/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/mercury/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/mercury/teams","hooks_url":"https://api.github.com/repos/Wikia/mercury/hooks","issue_events_url":"https://api.github.com/repos/Wikia/mercury/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/mercury/events","assignees_url":"https://api.github.com/repos/Wikia/mercury/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/mercury/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/mercury/tags","blobs_url":"https://api.github.com/repos/Wikia/mercury/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/mercury/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/mercury/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/mercury/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/mercury/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/mercury/languages","stargazers_url":"https://api.github.com/repos/Wikia/mercury/stargazers","contributors_url":"https://api.github.com/repos/Wikia/mercury/contributors","subscribers_url":"https://api.github.com/repos/Wikia/mercury/subscribers","subscription_url":"https://api.github.com/repos/Wikia/mercury/subscription","commits_url":"https://api.github.com/repos/Wikia/mercury/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/mercury/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/mercury/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/mercury/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/mercury/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/mercury/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/mercury/merges","archive_url":"https://api.github.com/repos/Wikia/mercury/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/mercury/downloads","issues_url":"https://api.github.com/repos/Wikia/mercury/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/mercury/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/mercury/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/mercury/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/mercury/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/mercury/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/mercury/deployments","created_at":"2014-02-10T21:44:25Z","updated_at":"2016-01-11T15:58:43Z","pushed_at":"2016-04-18T20:29:44Z","git_url":"git://github.com/Wikia/mercury.git","ssh_url":"git@github.com:Wikia/mercury.git","clone_url":"https://github.com/Wikia/mercury.git","svn_url":"https://github.com/Wikia/mercury","homepage":"","size":86790,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":13,"forks":6,"open_issues":13,"watchers":12,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2357"},"html":{"href":"https://github.com/Wikia/mercury/pull/2357"},"issue":{"href":"https://api.github.com/repos/Wikia/mercury/issues/2357"},"comments":{"href":"https://api.github.com/repos/Wikia/mercury/issues/2357/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2357/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/mercury/pulls/2357/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/mercury/statuses/3b71210cd71b98fdcf00176c1211d70a39a763b1"}}}}