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:
json_data = request.GET.get('data')
request_id = json.loads(json_data)['request']['id']
print(request_id)
except KeyError:
log.error("Endpoint {text} search request text not found".format(text=plugin_name))
return []
plugin = Registry().get('plugin_manager').get_plugin_by_name(plugin_name)
if plugin.status == PluginStatus.Active and plugin.media_item:
getattr(plugin.media_item, '{name}_go_live'.format(name=plugin_name)).emit([request_id, True])
return {'results': {'items': []}}
def service(request, plugin_name, log):

View File

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

View File

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