Skip to content

Commit

Permalink
fix(*): 修复全局充值转账相关刷积分问题
Browse files Browse the repository at this point in the history
fixed #448
  • Loading branch information
medz committed Nov 26, 2018
1 parent deccbf7 commit 5c390dd
Showing 1 changed file with 54 additions and 6 deletions.
60 changes: 54 additions & 6 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,26 @@
});

// 打赏用户
$api->post('/{target}/rewards', API2\UserRewardController::class.'@store');
tap($api->post('/{target}/rewards', API2\UserRewardController::class.'@store'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});

// 新版打赏用户
$api->post('/{target}/new-rewards', API2\NewUserRewardController::class.'@store');
tap($api->post('/{target}/new-rewards', API2\NewUserRewardController::class.'@store'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});

/*
* 解除手机号码绑定.
Expand Down Expand Up @@ -414,7 +430,15 @@
| 发起提现申请
*/

$api->post('/cashes', API2\WalletCashController::class.'@store');
tap($api->post('/cashes', API2\WalletCashController::class.'@store'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});

/*
| 充值钱包余额
Expand Down Expand Up @@ -456,7 +480,15 @@
$api->get('/cashes', API2\NewWalletCashController::class.'@show');

// 发起提现申请
$api->post('/cashes', API2\NewWalletCashController::class.'@store');
tap($api->post('/cashes', API2\NewWalletCashController::class.'@store'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});

// 发起充值
$api->post('/recharge', API2\NewWalletRechargeController::class.'@store');
Expand All @@ -468,10 +500,26 @@
$api->get('/orders/{order}', API2\NewWalletRechargeController::class.'@retrieve');

// 转账
$api->post('/transfer', API2\TransferController::class.'@transfer');
tap($api->post('/transfer', API2\TransferController::class.'@transfer'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});

// 转换积分
$api->post('/transform', API2\NewWalletRechargeController::class.'@transform');
tap($api->post('/transform', API2\NewWalletRechargeController::class.'@transform'), function ($route) {
$route->setAction(array_merge($route->getAction(), [
'middleware' => [
'cors-should',
'bindings',
'throttle:5,0.1'
],
]));
});
});

/*
Expand Down

0 comments on commit 5c390dd

Please sign in to comment.