This commit is contained in:
Tim Bentley 2016-06-19 09:57:38 +01:00
parent 9e62366d2b
commit 549598e5be
4 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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: