slim-app/

parent faf8a018
...@@ -187,7 +187,9 @@ class App extends BaseApp ...@@ -187,7 +187,9 @@ class App extends BaseApp
&& $parsed_result['inspectionResult']['webServiceSuccess'] === true && $parsed_result['inspectionResult']['webServiceSuccess'] === true
&& ( && (
($endpoint == $this->urlAcademicId) || ($endpoint == $this->urlAcademicId) ||
($endpoint == $this->urlAmka && is_array($parsed_result['inspectionResult']['beneficiaryNames'])) ($endpoint == $this->urlAmka
&& is_array($parsed_result['inspectionResult']['beneficiaryNames'])
&& count($parsed_result['inspectionResult']['beneficiaryNames']) > 0)
)) { )) {
return $this->withTextReady($res, 'isStudent:true'); return $this->withTextReady($res, 'isStudent:true');
} }
...@@ -240,10 +242,11 @@ class App extends BaseApp ...@@ -240,10 +242,11 @@ class App extends BaseApp
if (isset($parsed_result['inspectionResult']) if (isset($parsed_result['inspectionResult'])
&& $parsed_result['inspectionResult']['webServiceSuccess'] === true && $parsed_result['inspectionResult']['webServiceSuccess'] === true
&& is_array($parsed_result['inspectionResult']['beneficiaryNames'])) { && is_array($parsed_result['inspectionResult']['beneficiaryNames'])) {
return $this->withTextReady($res, $parsed_result['inspectionResult']['beneficiaryNames'][0]); if (count($parsed_result['inspectionResult']['beneficiaryNames']) > 0) {
} else { return $this->withTextReady($res, $parsed_result['inspectionResult']['beneficiaryNames'][0]);
return $this->withTextReady($res, 'false'); }
} }
return $this->withTextReady($res, 'false');
} }
return $this->withJsonReady($res, $results['response'], $results['http_status']); 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