mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 07:46:07 -07:00
Add ability to flush recently_added database table
This commit is contained in:
parent
d54794e85f
commit
395fc49087
4 changed files with 56 additions and 21 deletions
|
@ -341,6 +341,20 @@ class WebInterface(object):
|
|||
else:
|
||||
return {'result': 'error', 'message': 'Flush sessions failed.'}
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.json_out()
|
||||
@requireAuth(member_of("admin"))
|
||||
@addtoapi()
|
||||
def delete_recently_added(self, **kwargs):
|
||||
""" Flush out all of the recently added items in the database."""
|
||||
|
||||
result = database.delete_recently_added()
|
||||
|
||||
if result:
|
||||
return {'result': 'success', 'message': 'Recently added flushed.'}
|
||||
else:
|
||||
return {'result': 'error', 'message': 'Flush recently added failed.'}
|
||||
|
||||
|
||||
##### Libraries #####
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue