Clean code.

This commit is contained in:
Lars Jung 2015-04-17 17:50:27 +02:00
parent 57ab18355d
commit 762fd54788

View file

@ -7,19 +7,19 @@ modulejs.define('core/server', ['$', '_', 'config', 'core/location'], function (
if (hasApi) {
$.ajax({
url: location.getAbsHref(),
data: data,
type: 'POST',
dataType: 'json'
})
.done(function (json) {
url: location.getAbsHref(),
data: data,
type: 'POST',
dataType: 'json'
})
.done(function (json) {
callback(json);
})
.fail(function () {
callback(json);
})
.fail(function () {
callback();
});
callback();
});
} else {
callback();
}