1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 16:32:56 +01:00
Sonarr/UI/Commands/CommandController.js

18 lines
394 B
JavaScript
Raw Normal View History

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