parent
38589742e3
commit
1f4cf0034e
@ -1,11 +1,17 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
define(['app'], function () {
|
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({
|
return $.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url : NzbDrone.Constants.ApiRoot + '/command',
|
url : NzbDrone.Constants.ApiRoot + '/command',
|
||||||
data: JSON.stringify({command: name})
|
data: JSON.stringify(data)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
Loading…
Reference in new issue