Improve NanoSante pdf-viewer endpoint

This commit is contained in:
Djery-Tom 2022-02-21 11:33:13 +01:00
parent d9090d3bf8
commit 0747488327
2 changed files with 8 additions and 1 deletions

View File

@ -32,6 +32,13 @@ class NanoSanteServiceController extends Controller
));
}
public function getOriginal(Request $request)
{
return $this->nanoSanteService->get(
substr($request->getRequestUri(),strlen(config('services.nano_sante_service.name'))+1), $request->all(),$request->header()
);
}
public function post(Request $request)
{
return $this->successResponse($this->nanoSanteService->post(

View File

@ -203,7 +203,7 @@ $router->get('/geocode', 'HelperController@getGoogleGeocoding');
* Routes for NanoSante Service
*/
$router->group(['prefix' => '/'.config('services.nano_sante_service.name')], function () use ($router){
$router->get('pdf-viewer', 'NanoSanteServiceController@get');
$router->get('pdf-viewer', 'NanoSanteServiceController@getOriginal');
$router->group(['middleware' => 'auth:api'], function () use ($router){
// Insurances routes