Ken 1 viikko sitten
vanhempi
commit
aad2e099cd
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app/Http/Controllers/admin/Wallet.php

+ 1 - 1
app/Http/Controllers/admin/Wallet.php

@@ -95,7 +95,7 @@ class Wallet extends Controller
                         'change_type' => $changeType
                     ]));
             if (Cache::has($key)) {
-                return response()->json(['message' => '请求太频繁,请稍后再试。'], 429);
+                throw new Exception("请求太频繁,请稍后再试。",HttpStatus::CUSTOM_ERROR);
             }
             Cache::put($key, true, 3);