diff --git a/openlp/core/api/http/endpoint/__init__.py b/openlp/core/api/http/endpoint/__init__.py index b030313b8..aa8d0c720 100644 --- a/openlp/core/api/http/endpoint/__init__.py +++ b/openlp/core/api/http/endpoint/__init__.py @@ -24,8 +24,10 @@ The Endpoint class, which provides plugins with a way to serve their own portion """ import os +from functools import wraps from mako.template import Template +from webob import Request, Response class Endpoint(object): @@ -69,6 +71,7 @@ class Endpoint(object): print("path = ", path) return Template(filename=path, input_encoding='utf-8').render(**kwargs) + from .controller import controller_endpoint from .core import stage_endpoint from .service import service_endpoint diff --git a/openlp/core/api/http/endpoint/controller.py b/openlp/core/api/http/endpoint/controller.py index be24d3acb..b605df10e 100644 --- a/openlp/core/api/http/endpoint/controller.py +++ b/openlp/core/api/http/endpoint/controller.py @@ -104,7 +104,7 @@ def controller_set(request): data = int(json.loads(json_data)['request']['id']) event.emit([data]) except KeyError: - log.error("Endpoint controller/live/set request id not found")s + log.error("Endpoint controller/live/set request id not found") return {'results': {'success': True}} register_endpoint(controller_endpoint) diff --git a/openlp/core/api/http/endpoint/static/js/stage.js b/openlp/core/api/http/endpoint/static/js/stage.js index 6ec3d1aaa..48b1ebdc2 100644 --- a/openlp/core/api/http/endpoint/static/js/stage.js +++ b/openlp/core/api/http/endpoint/static/js/stage.js @@ -19,7 +19,7 @@ window.OpenLP = { loadService: function (event) { $.getJSON( - "/api/service/list", + "/service/list", function (data, status) { OpenLP.nextSong = ""; $("#notes").html(""); @@ -39,7 +39,7 @@ window.OpenLP = { }, loadSlides: function (event) { $.getJSON( - "/api/controller/live/text", + "/controller/live/text", function (data, status) { OpenLP.currentSlides = data.results.slides; OpenLP.currentSlide = 0; diff --git a/openlp/plugins/remotes/lib/httprouter.py b/openlp/plugins/remotes/lib/httprouter.py index 922a2425f..ef5b155f1 100644 --- a/openlp/plugins/remotes/lib/httprouter.py +++ b/openlp/plugins/remotes/lib/httprouter.py @@ -143,7 +143,7 @@ class HttpRouter(RegistryProperties, OpenLPMixin): """ auth_code = "{user}:{password}".format(user=Settings().value('remotes/user id'), password=Settings().value('remotes/password')) - self.openlppoll = Registry().get('api_poll') + self.openlppoll = Registry().get('poller') try: self.auth = base64.b64encode(auth_code) except TypeError: