mobilebackendgateway/routes/web.php

76 lines
3.1 KiB
PHP

<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/
//$router->get('/', function () use ($router) {
// return $router->app->version();
//});
/**
* Routes for MobileBackend
*/
$router->group(['prefix' => '/mobilebackend/interacted' , 'middleware' => 'auth:api'], function () use ($router){
$router->post('LoginAction', 'MobileBackendController@action');
$router->post('BalanceAction', 'MobileBackendController@action');
$router->post('ConfigAction', 'MobileBackendController@action');
$router->post('DemandeAction', 'MobileBackendController@action');
$router->post('MembersAction', 'MobileBackendController@action');
$router->post('LocationAction', 'MobileBackendController@action');
$router->post('NetworkAction', 'MobileBackendController@action');
$router->post('WalletAction', 'MobileBackendController@action');
});
/**
* Routes for MobileBackendTest
*/
$router->group(['prefix' => '/mobilebackendtest/interacted' , 'middleware' => 'auth:api'], function () use ($router){
$router->post('LoginAction', 'MobileBackendTestController@action');
$router->post('BalanceAction', 'MobileBackendTestController@action');
$router->post('ConfigAction', 'MobileBackendTestController@action');
$router->post('DemandeAction', 'MobileBackendTestController@action');
$router->post('MembersAction', 'MobileBackendTestController@action');
$router->post('LocationAction', 'MobileBackendTestController@action');
$router->post('NetworkAction', 'MobileBackendTestController@action');
$router->post('WalletAction', 'MobileBackendTestController@action');
});
/**
* Routes for Wallet Service
*/
$router->group(['prefix' => '/'.env('WALLET_SERVICE_NAME') ,'middleware' => 'auth:api'], function () use ($router){
// Transactions routes
$router->group(['prefix' => '/transactions'] , function () use ($router){
$router->post('','WalletController@post');
$router->get('{id_wallet}','WalletController@get');
});
// Credits routes
$router->group(['prefix' => '/credits'] , function () use ($router){
$router->put('treatDemand/{id_demand}','WalletController@put');
$router->put('cancelDemand/{id_demand}','WalletController@put');
});
$router->put('/virement/{id_wallet}','WalletController@put');
// Wallets routes
$router->group(['prefix' => '/wallets'] , function () use ($router){
$router->get('{id_agent}/activated', 'WalletController@get');
$router->get('{id_wallet}', 'WalletController@get');
$router->post('', 'WalletController@post');
});
});