فهرست منبع

Update UserController.php

António Duarte 3 سال پیش
والد
کامیت
57edcd0b57
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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([
         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);
         $user->increment('credits', $request->credits);