+ Add last transactions to walletService routes
This commit is contained in:
parent
556f4bd351
commit
21cdf17c91
|
@ -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()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -33,4 +33,9 @@ class WalletService
|
|||
{
|
||||
return $this->perfomRequest('GET',$uri,$data);
|
||||
}
|
||||
|
||||
public function put($uri , $data)
|
||||
{
|
||||
return $this->perfomRequest('PUT',$uri,$data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,17 @@
|
|||
*/
|
||||
$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');
|
||||
|
||||
// Wallets routes
|
||||
|
|
Loading…
Reference in New Issue