Added test button to notification edit

This commit is contained in:
Mark McDowall 2013-06-12 19:55:11 -07:00
parent 38589742e3
commit 1f4cf0034e
7 changed files with 78 additions and 8 deletions

View file

@ -1,11 +1,17 @@
"use strict";
define(['app'], function () {
NzbDrone.Commands.Execute = function (name) {
NzbDrone.Commands.Execute = function (name, properties) {
var data = { command: name };
if (properties !== undefined) {
$.extend(data, properties);
}
return $.ajax({
type: 'POST',
url : NzbDrone.Constants.ApiRoot + '/command',
data: JSON.stringify({command: name})
data: JSON.stringify(data)
});
};
});