add ability to get the full account data
This commit is contained in:
Родитель
cf4242ee60
Коммит
d2d7338efb
|
@ -45,6 +45,7 @@ def make_map(config):
|
|||
map.connect('/docs', controller='docs', action="index")
|
||||
map.connect('/send', controller='send', action="send")
|
||||
map.connect('/account/get', controller='account', action="get")
|
||||
map.connect('/account/get/full', controller='account', action="get", domain="full")
|
||||
map.connect('/contacts/{domain}', controller='contacts', action="get")
|
||||
|
||||
map.connect('/{controller}/{action}')
|
||||
|
|
|
@ -54,6 +54,8 @@ OAuth authorization api.
|
|||
@json_exception_response
|
||||
def get(self, domain=None):
|
||||
keys = [k for k in session.get('account_keys', '').split(',') if k]
|
||||
if domain == 'full':
|
||||
return [p for p in [session[k] for k in keys] if p]
|
||||
return [p for p in [session[k].get('profile') for k in keys] if p]
|
||||
|
||||
def signout(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче