mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 16:52:58 -07:00
Add optional include_last_seen parameter to get_user
This commit is contained in:
parent
c3f9072e21
commit
88cae2b0dc
2 changed files with 21 additions and 13 deletions
|
@ -1588,15 +1588,15 @@ class WebInterface(object):
|
|||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
@addtoapi()
|
||||
def get_user(self, user_id=None, **kwargs):
|
||||
def get_user(self, user_id=None, include_last_seen=False, **kwargs):
|
||||
""" Get a user's details.
|
||||
|
||||
```
|
||||
Required parameters:
|
||||
user_id (str): The id of the Plex user
|
||||
user_id (str): The id of the Plex user
|
||||
|
||||
Optional parameters:
|
||||
None
|
||||
include_last_seen (bool): True to include the last_seen value for the user.
|
||||
|
||||
Returns:
|
||||
json:
|
||||
|
@ -1620,9 +1620,11 @@ class WebInterface(object):
|
|||
}
|
||||
```
|
||||
"""
|
||||
include_last_seen = helpers.bool_true(include_last_seen)
|
||||
if user_id:
|
||||
user_data = users.Users()
|
||||
user_details = user_data.get_details(user_id=user_id)
|
||||
user_details = user_data.get_details(user_id=user_id,
|
||||
include_last_seen=include_last_seen)
|
||||
if user_details:
|
||||
return user_details
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue