From 0b671d7849e557018b92105c4d79a8326df20408 Mon Sep 17 00:00:00 2001 From: Stavros Papadakis Date: Wed, 1 Mar 2017 11:48:01 +0200 Subject: [PATCH] Fix responses --- academic-id/slim-app/src/osteam/App.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/academic-id/slim-app/src/osteam/App.php b/academic-id/slim-app/src/osteam/App.php index ea03c89..065fe7d 100644 --- a/academic-id/slim-app/src/osteam/App.php +++ b/academic-id/slim-app/src/osteam/App.php @@ -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']); } -- GitLab