You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/UI/Commands/CommandController.js

22 lines
562 B

'use strict';
11 years ago
define(
[
'Commands/CommandModel',
'Commands/CommandCollection',
'underscore'
], function (CommandModel, CommandCollection, _) {
11 years ago
return{
Execute: function (name, properties) {
var attr = _.extend({name: name.toLocaleLowerCase()}, properties);
11 years ago
var commandModel = new CommandModel(attr);
return commandModel.save().success(function () {
CommandCollection.add(commandModel);
});
}
}
});