summaryrefslogtreecommitdiffstats
path: root/pyload/web/app/scripts/models/Account.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 18:45:13 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2014-01-18 18:45:13 +0100
commit453c1e55c71a96c9529ecdca1d55278cc41088d6 (patch)
tree7a516a84e5590ce5f1f3def71c24bcb14f209023 /pyload/web/app/scripts/models/Account.js
parentsmall fixes and improvements for download engine (diff)
downloadpyload-453c1e55c71a96c9529ecdca1d55278cc41088d6.tar.xz
rewritten download scheduling, improved account manager, db version increased all data will be overwritten
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);
},