mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Remove error cmd from API
This commit is contained in:
parent
21d9091b43
commit
960b601384
3 changed files with 11 additions and 31 deletions
8
API.md
8
API.md
|
@ -145,14 +145,6 @@ Returns:
|
||||||
### delete_temp_sessions
|
### delete_temp_sessions
|
||||||
Flush out all of the temporary sessions in the database.
|
Flush out all of the temporary sessions in the database.
|
||||||
|
|
||||||
```
|
|
||||||
Required parameters:
|
|
||||||
None
|
|
||||||
|
|
||||||
Required parameters:
|
|
||||||
None
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### delete_user
|
### delete_user
|
||||||
Delete a user from PlexPy. Also erases all history for the user.
|
Delete a user from PlexPy. Also erases all history for the user.
|
||||||
|
|
|
@ -427,9 +427,6 @@ General optional parameters:
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def error(self, **kwargs):
|
|
||||||
return 1 / 0
|
|
||||||
|
|
||||||
def _api_responds(self, result_type='error', data=None, msg=''):
|
def _api_responds(self, result_type='error', data=None, msg=''):
|
||||||
""" Formats the result to a predefined dict so we can hange it the to
|
""" Formats the result to a predefined dict so we can hange it the to
|
||||||
the desired output by _api_out_as """
|
the desired output by _api_out_as """
|
||||||
|
@ -513,12 +510,12 @@ General optional parameters:
|
||||||
|
|
||||||
result = call(**self._api_kwargs)
|
result = call(**self._api_kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(u'PlexPy APIv2 :: Failed to run %s %s %s' % (self._api_cmd, self._api_kwargs, e))
|
logger.error(u'PlexPy APIv2 :: Failed to run %s with %s: %s' % (self._api_cmd, self._api_kwargs, e))
|
||||||
if self._api_debug:
|
if self._api_debug:
|
||||||
cherrypy.request.show_tracebacks = True
|
cherrypy.request.show_tracebacks = True
|
||||||
# Reraise the exception so the traceback hits the browser
|
# Reraise the exception so the traceback hits the browser
|
||||||
raise
|
raise
|
||||||
self._api_msg = 'Check the log'
|
self._api_msg = 'Check the logs'
|
||||||
|
|
||||||
ret = None
|
ret = None
|
||||||
# The api decorated function can return different result types.
|
# The api decorated function can return different result types.
|
||||||
|
|
|
@ -331,16 +331,7 @@ class WebInterface(object):
|
||||||
@requireAuth(member_of("admin"))
|
@requireAuth(member_of("admin"))
|
||||||
@addtoapi()
|
@addtoapi()
|
||||||
def delete_temp_sessions(self, **kwargs):
|
def delete_temp_sessions(self, **kwargs):
|
||||||
""" Flush out all of the temporary sessions in the database.
|
""" Flush out all of the temporary sessions in the database."""
|
||||||
|
|
||||||
```
|
|
||||||
Required parameters:
|
|
||||||
None
|
|
||||||
|
|
||||||
Required parameters:
|
|
||||||
None
|
|
||||||
```
|
|
||||||
"""
|
|
||||||
|
|
||||||
result = database.delete_sessions()
|
result = database.delete_sessions()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue