This commit is contained in:
Tim Bentley 2018-01-27 11:15:49 +00:00
parent c9ff4b2209
commit cffd8e603d
3 changed files with 1 additions and 4 deletions

View File

@ -65,14 +65,12 @@ def live(request, plugin_name, log):
try: try:
json_data = request.GET.get('data') json_data = request.GET.get('data')
request_id = json.loads(json_data)['request']['id'] request_id = json.loads(json_data)['request']['id']
print(request_id)
except KeyError: except KeyError:
log.error("Endpoint {text} search request text not found".format(text=plugin_name)) log.error("Endpoint {text} search request text not found".format(text=plugin_name))
return [] return []
plugin = Registry().get('plugin_manager').get_plugin_by_name(plugin_name) plugin = Registry().get('plugin_manager').get_plugin_by_name(plugin_name)
if plugin.status == PluginStatus.Active and plugin.media_item: if plugin.status == PluginStatus.Active and plugin.media_item:
getattr(plugin.media_item, '{name}_go_live'.format(name=plugin_name)).emit([request_id, True]) getattr(plugin.media_item, '{name}_go_live'.format(name=plugin_name)).emit([request_id, True])
return {'results': {'items': []}}
def service(request, plugin_name, log): def service(request, plugin_name, log):

View File

@ -91,7 +91,7 @@ def _make_response(view_result):
content_type='text/html', charset='utf8') content_type='text/html', charset='utf8')
else: else:
return Response(body=view_result, status=200, return Response(body=view_result, status=200,
content_type='text/text', charset='utf8') content_type='text/plain', charset='utf8')
def _handle_exception(error): def _handle_exception(error):

View File

@ -39,7 +39,6 @@ def bibles_search(request):
:param request: The http request object. :param request: The http request object.
""" """
print("A")
return search(request, 'bibles', log) return search(request, 'bibles', log)