mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
rjs -> webpack
This commit is contained in:
@@ -1,25 +1,16 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone'
|
||||
], function (Backbone) {
|
||||
return Backbone.Model.extend({
|
||||
var Backbone = require('backbone');
|
||||
|
||||
defaults: {
|
||||
seasonNumber: 0,
|
||||
status : 0
|
||||
},
|
||||
|
||||
methodUrls: {
|
||||
'update': window.NzbDrone.ApiRoot + '/episode'
|
||||
},
|
||||
|
||||
sync: function(method, model, options) {
|
||||
if (model.methodUrls && model.methodUrls[method.toLowerCase()]) {
|
||||
options = options || {};
|
||||
options.url = model.methodUrls[method.toLowerCase()];
|
||||
}
|
||||
return Backbone.sync(method, model, options);
|
||||
}
|
||||
});
|
||||
});
|
||||
module.exports = Backbone.Model.extend({
|
||||
defaults : {
|
||||
seasonNumber : 0,
|
||||
status : 0
|
||||
},
|
||||
methodUrls : {"update" : window.NzbDrone.ApiRoot + '/episode'},
|
||||
sync : function(method, model, options){
|
||||
if(model.methodUrls && model.methodUrls[method.toLowerCase()]) {
|
||||
options = options || {};
|
||||
options.url = model.methodUrls[method.toLowerCase()];
|
||||
}
|
||||
return Backbone.sync(method, model, options);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user