diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-31 18:32:13 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-31 18:32:13 +0200 |
commit | 9ea1ab90b4705ef4d5ce37ded36a214f276c0a18 (patch) | |
tree | 995539a44a25c54344639d5ade7aa3e48624ed97 /module/api/AccountApi.py | |
parent | added account page (diff) | |
download | pyload-9ea1ab90b4705ef4d5ce37ded36a214f276c0a18.tar.xz |
add and delete accounts, db will be resetted
Diffstat (limited to 'module/api/AccountApi.py')
-rw-r--r-- | module/api/AccountApi.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/module/api/AccountApi.py b/module/api/AccountApi.py index d1586e7aa..981842b5c 100644 --- a/module/api/AccountApi.py +++ b/module/api/AccountApi.py @@ -19,7 +19,7 @@ class AccountApi(ApiComponent): accs = self.core.accountManager.getAllAccounts(refresh) accounts = [] for plugin in accs.itervalues(): - accounts.extend(plugin.values()) + accounts.extend([acc.toInfoData() for acc in plugin.values()]) return accounts @@ -32,9 +32,10 @@ class AccountApi(ApiComponent): return self.core.pluginManager.getPlugins("accounts").keys() @RequirePerm(Permission.Accounts) - def updateAccount(self, plugin, account, password=None, options={}): + def updateAccount(self, plugin, login, password): """Changes pw/options for specific account.""" - self.core.accountManager.updateAccount(plugin, account, password, options) + # TODO: options + self.core.accountManager.updateAccount(plugin, login, password, {}) def updateAccountInfo(self, account): """ Update account from :class:`AccountInfo` """ @@ -46,8 +47,7 @@ class AccountApi(ApiComponent): :param account: :class:`ÀccountInfo` instance """ - # TODO - self.core.accountManager.removeAccount(plugin, account) + self.core.accountManager.removeAccount(account.plugin, account.loginname) if Api.extend(AccountApi): |