Move BaseRedirect to webserve

This commit is contained in:
JonnyWong16 2020-03-24 21:06:09 -07:00
parent cc05552685
commit bde6309277
2 changed files with 15 additions and 19 deletions

View file

@ -155,6 +155,18 @@ def mako_error_handler(context, error):
raise
class BaseRedirect(object):
@cherrypy.expose
def index(self):
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT)
@cherrypy.expose
def status(self, *args, **kwargs):
path = '/' + '/'.join(args) if args else ''
query = '?' + urlencode(kwargs) if kwargs else ''
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT + 'status' + path + query)
class WebInterface(object):
auth = AuthController()