恢复 用户必须有 1 元才能开设计费项目
This commit is contained in:
parent
0c8e682acc
commit
6787b46da8
@ -24,13 +24,13 @@ public function call(Request $request, Module $module)
|
||||
$method = Str::lower($request->method());
|
||||
|
||||
// 如果 method 为 post, 检查用户余额
|
||||
// if ($method == 'post') {
|
||||
// $user = auth()->user();
|
||||
if ($method == 'post') {
|
||||
$user = auth()->user();
|
||||
|
||||
// if ($user->balance < 1) {
|
||||
// return $this->error('账户余额不足,请保证账户余额至少有 1 元。');
|
||||
// }
|
||||
// }
|
||||
if ($user->balance < 1) {
|
||||
return $this->error('账户余额不足,请保证账户余额至少有 1 元。');
|
||||
}
|
||||
}
|
||||
|
||||
$response = $module->request($method, $path, $request->all());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user