+ Add last transactions to walletService routes

This commit is contained in:
DJERY-TOM 2020-04-25 12:43:44 +01:00
parent 556f4bd351
commit 21cdf17c91
3 changed files with 24 additions and 1 deletions

View File

@ -42,5 +42,13 @@ class WalletController extends Controller
)); ));
} }
public function put(Request $request)
{
return $this->successResponse($this->walletService->put(
substr($request->getRequestUri(),strlen(env('WALLET_SERVICE_NAME'))+1), $request->all()
));
}
} }

View File

@ -33,4 +33,9 @@ class WalletService
{ {
return $this->perfomRequest('GET',$uri,$data); return $this->perfomRequest('GET',$uri,$data);
} }
public function put($uri , $data)
{
return $this->perfomRequest('PUT',$uri,$data);
}
} }

View File

@ -52,7 +52,17 @@
*/ */
$router->group(['prefix' => '/'.env('WALLET_SERVICE_NAME') ,'middleware' => 'auth:api'], function () use ($router){ $router->group(['prefix' => '/'.env('WALLET_SERVICE_NAME') ,'middleware' => 'auth:api'], function () use ($router){
$router->post('/transactions','WalletController@post'); // Transactions routes
$router->group(['prefix' => '/transactions'] , function () use ($router){
$router->post('','WalletControllerr@post');
$router->get('{id_wallet}','WalletController@get');
});
// Credits routes
$router->group(['prefix' => '/credits'] , function () use ($router){
$router->put('treatDemand/{id_demand}','WalletController@put');
});
$router->post('/virement','WalletController@post'); $router->post('/virement','WalletController@post');
// Wallets routes // Wallets routes