summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/models
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/web/app/scripts/models')
-rw-r--r--pyload/web/app/scripts/models/Account.js8
-rw-r--r--pyload/web/app/scripts/models/StatusInfo.js (renamed from pyload/web/app/scripts/models/ServerStatus.js)5
2 files changed, 8 insertions, 5 deletions
diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js
index 26241d8e3..b9fc40036 100644
--- a/pyload/web/app/scripts/models/Account.js
+++ b/pyload/web/app/scripts/models/Account.js
@@ -3,9 +3,10 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
return Backbone.Model.extend({
- idAttribute: 'loginname',
+ idAttribute: 'aid',
defaults: {
+ aid: null,
plugin: null,
loginname: null,
owner: -1,
@@ -53,14 +54,15 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
var refresh = _.has(options, 'refresh') && options.refresh;
options = App.apiRequest('getAccountInfo',
{plugin: this.get('plugin'),
- loginname: this.get('loginname'), refresh: refresh}, options);
+ aid: this.get('aid'), refresh: refresh}, options);
return Backbone.Model.prototype.fetch.call(this, options);
},
setPassword: function(password, options) {
options = App.apiRequest('updateAccount',
- {plugin: this.get('plugin'), loginname: this.get('loginname'), password: password}, options);
+ {aid: this.get('aid'),
+ plugin: this.get('plugin'), loginname: this.get('loginname'), password: password}, options);
return $.ajax(options);
},
diff --git a/pyload/web/app/scripts/models/ServerStatus.js b/pyload/web/app/scripts/models/StatusInfo.js
index 59739b41e..8712defa7 100644
--- a/pyload/web/app/scripts/models/ServerStatus.js
+++ b/pyload/web/app/scripts/models/StatusInfo.js
@@ -13,7 +13,8 @@ define(['jquery', 'backbone', 'underscore'],
notifications: -1,
paused: false,
download: false,
- reconnect: false
+ reconnect: false,
+ quota: -1
},
// Model Constructor
@@ -23,7 +24,7 @@ define(['jquery', 'backbone', 'underscore'],
fetch: function(options) {
options || (options = {});
- options.url = 'api/getServerStatus';
+ options.url = 'api/getStatusInfo';
return Backbone.Model.prototype.fetch.call(this, options);
},