增加 余额检测
This commit is contained in:
parent
6dd4caef5c
commit
153391aa51
@ -30,6 +30,11 @@ public function update(Request $request, Host $host): JsonResponse
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
|
|
||||||
|
if ($user->balances < 1) {
|
||||||
|
return $this->error('余额不足,无法开启计费项目。');
|
||||||
|
}
|
||||||
|
|
||||||
if ($host->user_id == $user->id) {
|
if ($host->user_id == $user->id) {
|
||||||
$host->update([
|
$host->update([
|
||||||
'status' => $request->status,
|
'status' => $request->status,
|
||||||
|
Loading…
Reference in New Issue
Block a user