{"action":"created","issue":{"url":"https://api.github.com/repos/hulilabs/ju-shared/issues/19","repository_url":"https://api.github.com/repos/hulilabs/ju-shared","labels_url":"https://api.github.com/repos/hulilabs/ju-shared/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/hulilabs/ju-shared/issues/19/comments","events_url":"https://api.github.com/repos/hulilabs/ju-shared/issues/19/events","html_url":"https://github.com/hulilabs/ju-shared/issues/19","id":187218062,"number":19,"title":"Remove redundant callback wrapper from ajax handler hook","user":{"login":"kenntchan","id":3135637,"avatar_url":"https://avatars.githubusercontent.com/u/3135637?v=3","gravatar_id":"","url":"https://api.github.com/users/kenntchan","html_url":"https://github.com/kenntchan","followers_url":"https://api.github.com/users/kenntchan/followers","following_url":"https://api.github.com/users/kenntchan/following{/other_user}","gists_url":"https://api.github.com/users/kenntchan/gists{/gist_id}","starred_url":"https://api.github.com/users/kenntchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenntchan/subscriptions","organizations_url":"https://api.github.com/users/kenntchan/orgs","repos_url":"https://api.github.com/users/kenntchan/repos","events_url":"https://api.github.com/users/kenntchan/events{/privacy}","received_events_url":"https://api.github.com/users/kenntchan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"kenntchan","id":3135637,"avatar_url":"https://avatars.githubusercontent.com/u/3135637?v=3","gravatar_id":"","url":"https://api.github.com/users/kenntchan","html_url":"https://github.com/kenntchan","followers_url":"https://api.github.com/users/kenntchan/followers","following_url":"https://api.github.com/users/kenntchan/following{/other_user}","gists_url":"https://api.github.com/users/kenntchan/gists{/gist_id}","starred_url":"https://api.github.com/users/kenntchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenntchan/subscriptions","organizations_url":"https://api.github.com/users/kenntchan/orgs","repos_url":"https://api.github.com/users/kenntchan/repos","events_url":"https://api.github.com/users/kenntchan/events{/privacy}","received_events_url":"https://api.github.com/users/kenntchan/received_events","type":"User","site_admin":false},"assignees":[{"login":"kenntchan","id":3135637,"avatar_url":"https://avatars.githubusercontent.com/u/3135637?v=3","gravatar_id":"","url":"https://api.github.com/users/kenntchan","html_url":"https://github.com/kenntchan","followers_url":"https://api.github.com/users/kenntchan/followers","following_url":"https://api.github.com/users/kenntchan/following{/other_user}","gists_url":"https://api.github.com/users/kenntchan/gists{/gist_id}","starred_url":"https://api.github.com/users/kenntchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenntchan/subscriptions","organizations_url":"https://api.github.com/users/kenntchan/orgs","repos_url":"https://api.github.com/users/kenntchan/repos","events_url":"https://api.github.com/users/kenntchan/events{/privacy}","received_events_url":"https://api.github.com/users/kenntchan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-11-03T23:34:51Z","updated_at":"2016-11-08T17:58:02Z","closed_at":"2016-11-08T17:58:02Z","body":"The callback `beforeMakingAjaxRequest` in the code below simply does what the code in the `else` executes. I'd like to remove the callback in order for the hook to be able to do more useful processing without having the side effect of executing the ajax callback.\r\n``` javascript\r\nif ('function' === typeof this.opts.beforeMakingAjaxRequest) {\r\n    var performAjaxRequestCallback = $.proxy($.ajax, $);\r\n    return this.opts.beforeMakingAjaxRequest(performAjaxRequestCallback, params);\r\n} else {\r\n    // if no hook is provided, performs the request\r\n    return $.ajax(params);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/hulilabs/ju-shared/issues/comments/259210360","html_url":"https://github.com/hulilabs/ju-shared/issues/19#issuecomment-259210360","issue_url":"https://api.github.com/repos/hulilabs/ju-shared/issues/19","id":259210360,"user":{"login":"jpgarbanzo","id":3778202,"avatar_url":"https://avatars.githubusercontent.com/u/3778202?v=3","gravatar_id":"","url":"https://api.github.com/users/jpgarbanzo","html_url":"https://github.com/jpgarbanzo","followers_url":"https://api.github.com/users/jpgarbanzo/followers","following_url":"https://api.github.com/users/jpgarbanzo/following{/other_user}","gists_url":"https://api.github.com/users/jpgarbanzo/gists{/gist_id}","starred_url":"https://api.github.com/users/jpgarbanzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpgarbanzo/subscriptions","organizations_url":"https://api.github.com/users/jpgarbanzo/orgs","repos_url":"https://api.github.com/users/jpgarbanzo/repos","events_url":"https://api.github.com/users/jpgarbanzo/events{/privacy}","received_events_url":"https://api.github.com/users/jpgarbanzo/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T17:58:02Z","updated_at":"2016-11-08T17:58:02Z","body":"I'll close this one for now.\r\n\r\nWe need to eventually improve the approach and use Promises. We can open another issue then.\r\n\r\nThanks!"}}
{"actor":{"display_login":"jpgarbanzo"}}