Fix responses

parent 091d45e8
......@@ -121,7 +121,7 @@ class App extends BaseApp
'message' => 'Error: Service Call Parameters Error, fields query parameter has unknown fields'
]), 400);
} else {
return $this->withTextReady($res, implode(',', $response_texts), 400);
return $this->withTextReady($res, implode(',', $response_texts), 200);
}
}
return $this->withJsonReady($res, $results['response'], $results['http_status']);
......@@ -241,9 +241,11 @@ class App extends BaseApp
&& $parsed_result['inspectionResult']['webServiceSuccess'] === true
&& is_array($parsed_result['inspectionResult']['beneficiaryNames'])) {
return $this->withTextReady($res, $parsed_result['inspectionResult']['beneficiaryNames'][0]);
} else {
return $this->withTextReady($res, 'false');
}
}
return $this->withTextReady($res, 'false');
return $this->withJsonReady($res, $results['response'], $results['http_status']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment