1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-03-05 15:15:59 +02:00
Sonarr/UI/Commands/CommandController.js

18 lines
394 B
JavaScript
Raw Normal View History

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