mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-15 01:32:57 -07:00
Add button to clear notification logs
This commit is contained in:
parent
b39e7bbb6d
commit
7f5d9bec87
3 changed files with 44 additions and 1 deletions
|
@ -1096,6 +1096,19 @@ class WebInterface(object):
|
|||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps(notifications)
|
||||
|
||||
@cherrypy.expose
|
||||
@addtoapi()
|
||||
def clearNotifyLogs(self, **kwargs):
|
||||
data_factory = datafactory.DataFactory()
|
||||
result = data_factory.delete_notification_log()
|
||||
|
||||
if result:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps({'message': result})
|
||||
else:
|
||||
cherrypy.response.headers['Content-type'] = 'application/json'
|
||||
return json.dumps({'message': 'no data received'})
|
||||
|
||||
@cherrypy.expose
|
||||
def clearLogs(self):
|
||||
plexpy.LOG_LIST = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue