this.$('.modal-warning').hide();
var that = this,
url = baseUrl + '/api/rules/' + action;
- return $.post(url, options).done(function () {
+ return $.ajax({
+ url: url,
+ type: 'POST',
+ data: options,
+ statusCode: {
+ // do not show global error
+ 400: null
+ }
+ }).done(function () {
if (that.options.templateRule) {
that.options.app.controller.showDetails(that.options.templateRule);
} else {
this.$('.modal-warning').hide();
var that = this,
url = baseUrl + '/api/rules/' + action;
- return $.post(url, options).done(function (r) {
+ return $.ajax({
+ url: url,
+ type: 'POST',
+ data: options,
+ statusCode: {
+ // do not show global error
+ 400: null
+ }
+ }).done(function (r) {
if (typeof r === 'string') {
r = JSON.parse(r);
}
rule_key: ruleKey,
severity: severity,
params: paramsHash
+ },
+ statusCode: {
+ // do not show global error
+ 400: null
}
}).done(function () {
that.trigger('profileActivated', severity, params);