Browse Source

Update UserController.php

António Duarte 3 năm trước cách đây
mục cha
commit
57edcd0b57
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      app/Http/Controllers/Api/UserController.php

+ 1 - 1
app/Http/Controllers/Api/UserController.php

@@ -80,7 +80,7 @@ class UserController extends Controller
         ]);
         
         if ($request->user()->credits + $request->credits >= 99999999) throw ValidationException::withMessages([
-            'code' => "You can't add this amount of credits because you would exceed the credit limit"
+            'credits' => "You can't add this amount of credits because you would exceed the credit limit"
         ]);
         
         $user->increment('credits', $request->credits);