def ajax_citations(): """Handler for datatables citations view""" recid = request.args.get('recid', '') endpoint = request.args.get('endpoint', '') pid_type = get_pid_type_from_endpoint(endpoint) pid = PersistentIdentifier.get(pid_type, recid) record = LiteratureSearch().get_source(pid.object_uuid) return jsonify({'data': get_and_format_citations(record)})
def ajax_citations(): """Handler for datatables citations view .. deprecated:: 2018-08-23 """ recid = request.args.get('recid', '') endpoint = request.args.get('endpoint', '') pid_type = get_pid_type_from_endpoint(endpoint) pid = PersistentIdentifier.get(pid_type, recid) record = LiteratureSearch().get_source(pid.object_uuid) return jsonify({'data': get_and_format_citations(record)})