parent
38589742e3
commit
1f4cf0034e
@ -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)
|
||||
});
|
||||
};
|
||||
});
|
Loading…
Reference in new issue