summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/models/Account.js
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/web/app/scripts/models/Account.js')
-rw-r--r--pyload/web/app/scripts/models/Account.js8
1 files changed, 5 insertions, 3 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);
},