Lidarr/UI/Commands/CommandController.js

17 lines
394 B
JavaScript
Raw Normal View History

2013-05-11 23:39:32 +00:00
"use strict";
define(['app'], function () {
2013-06-13 02:55:11 +00:00
NzbDrone.Commands.Execute = function (name, properties) {
var data = { command: name };
2013-06-13 15:21:38 +00:00
if (!properties) {
2013-06-13 02:55:11 +00:00
$.extend(data, properties);
}
2013-05-11 23:39:32 +00:00
return $.ajax({
type: 'POST',
url : NzbDrone.Constants.ApiRoot + '/command',
2013-06-13 02:55:11 +00:00
data: JSON.stringify(data)
2013-05-11 23:39:32 +00:00
});
};
});