mirror of
https://github.com/Radarr/Radarr
synced 2024-12-27 10:19:41 +00:00
26 lines
643 B
JavaScript
26 lines
643 B
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'backbone',
|
|
'Commands/CommandModel',
|
|
'Mixins/backbone.signalr.mixin'
|
|
], function (Backbone, CommandModel) {
|
|
|
|
var CommandCollection = Backbone.Collection.extend({
|
|
url : window.ApiRoot + '/command',
|
|
model: CommandModel,
|
|
|
|
findCommand: function (command) {
|
|
return this.find(function (model) {
|
|
return model.isSameCommand(command);
|
|
});
|
|
}
|
|
|
|
});
|
|
|
|
var collection = new CommandCollection().bindSignalR();
|
|
|
|
collection.fetch();
|
|
|
|
return collection;
|
|
});
|