Ken пре 1 недеља
родитељ
комит
bff86fb4e8
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      app/Http/Controllers/admin/Bet.php

+ 2 - 2
app/Http/Controllers/admin/Bet.php

@@ -72,9 +72,9 @@ class Bet extends Controller
             }
             $result = ['total' => $count, 'total_amount' => $totalAmount, 'data' => $list];
         } catch (ValidationException $e) {
-            return $this->error(HttpStatus::VALIDATION_FAILED, $e->validator->errors()->first());
+            return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
         } catch (Exception $e) {
-            return $this->error(HttpStatus::CUSTOM_ERROR, $e->getMessage());
+            return $this->error($e->getCode(), $e->getMessage());
         }
         return $this->success($result);
     }