Renamed 'process' to 'processorData' (#251)
Reviewed-on: #251 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
@@ -29,13 +29,13 @@ def process_xml(request: request, type: str) -> str:
|
||||
try:
|
||||
request_data = json.loads(request.get_data(as_text=True))
|
||||
data = request_data['data']
|
||||
process = request_data['process']
|
||||
processorData = request_data['processorData']
|
||||
if (type == "xsd"):
|
||||
response_json['result'] = Parser.xsd(data, process)
|
||||
response_json['result'] = Parser.xsd(data, processorData)
|
||||
elif (type == "xslt"):
|
||||
response_json['result'] = Parser.xslt(data, process)
|
||||
response_json['result'] = Parser.xslt(data, processorData)
|
||||
elif (type == "xpath"):
|
||||
response_json['result'], response_json['type'] = Parser.xpath(data, process)
|
||||
response_json['result'], response_json['type'] = Parser.xpath(data, processorData)
|
||||
elif (type == "prettify"):
|
||||
response_json['result'] = Parser.formatXML(data, True)
|
||||
elif (type == "minimize"):
|
||||
@@ -45,7 +45,7 @@ def process_xml(request: request, type: str) -> str:
|
||||
elif (type == "minimizeHtml"):
|
||||
response_json['result'] = Parser.formatHTML(data, False)
|
||||
elif (type == "convertHTML"):
|
||||
response_json['result'] = Parser.convertHTML(data, process)
|
||||
response_json['result'] = Parser.convertHTML(data, processorData)
|
||||
else:
|
||||
raise ValueError("Valid operation types are: xsd, xslt, xpath")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user