forked from openlp/openlp
move endpoint
This commit is contained in:
parent
9d6bd78a70
commit
f58d1047db
|
@ -21,18 +21,13 @@
|
|||
###############################################################################
|
||||
import logging
|
||||
|
||||
import os
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.endpoint.core import TRANSLATED_STRINGS
|
||||
from openlp.core.common import AppLocation
|
||||
|
||||
|
||||
static_dir = os.path.join(str(AppLocation.get_section_data_path('remotes')))
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
remote_endpoint = Endpoint('remote', template_dir=static_dir, static_dir=static_dir)
|
||||
remote_endpoint = Endpoint('remote', template_dir='remotes', static_dir='remotes')
|
||||
|
||||
|
||||
@remote_endpoint.route('{view}')
|
||||
|
|
|
@ -23,7 +23,7 @@ import logging
|
|||
import json
|
||||
|
||||
from openlp.core.api.http.endpoint import Endpoint
|
||||
from openlp.core.api.http import register_endpoint, requires_auth
|
||||
from openlp.core.api.http import requires_auth
|
||||
from openlp.core.common import Registry
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ from openlp.core.api.poll import Poller
|
|||
from openlp.core.api.endpoint.controller import controller_endpoint, api_controller_endpoint
|
||||
from openlp.core.api.endpoint.core import chords_endpoint, stage_endpoint, blank_endpoint, main_endpoint
|
||||
from openlp.core.api.endpoint.service import service_endpoint, api_service_endpoint
|
||||
from openlp.core.api.endpoint.remote import remote_endpoint
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -95,3 +97,4 @@ class HttpServer(RegistryMixin, RegistryProperties, OpenLPMixin):
|
|||
register_endpoint(main_endpoint)
|
||||
register_endpoint(service_endpoint)
|
||||
register_endpoint(api_service_endpoint)
|
||||
register_endpoint(remote_endpoint)
|
||||
|
|
|
@ -95,6 +95,6 @@ def songs_service_api(request):
|
|||
:param request: The http request object.
|
||||
"""
|
||||
try:
|
||||
return search(request, 'songs', log)
|
||||
return service(request, 'songs', log)
|
||||
except NotFound:
|
||||
return {'results': {'items': []}}
|
||||
|
|
Loading…
Reference in New Issue