request controller: minor cleanup

This commit is contained in:
rolux 2012-11-04 12:05:25 +01:00
parent abb76703ce
commit c03efd71fe

View file

@ -12,7 +12,6 @@ Ox.Request <o> Basic request controller
Ox.Request = (function() { Ox.Request = (function() {
var cache = {}, var cache = {},
//dfd = $.Deferred(),
$element, $element,
pending = {}, pending = {},
requests = {}, requests = {},
@ -181,7 +180,7 @@ Ox.Request = (function() {
}; };
} }
} }
if (data.status.code == 200 || data.status.code == 404 || data.status.code == 409) { if (Ox.contains([200, 404, 409], data.status.code)) {
// we have to include not found and conflict // we have to include not found and conflict
// so that handlers can handle these cases // so that handlers can handle these cases
cache[req] = { cache[req] = {
@ -195,8 +194,6 @@ Ox.Request = (function() {
pending[options.id] = false; pending[options.id] = false;
} }
// return dfd.promise();
return options.id; return options.id;
}, },