Browse Source

fix: 🐛 Server creation fail when server.price = user.credits

IceToast 2 năm trước cách đây
mục cha
commit
35734579ae

+ 1 - 1
app/Http/Controllers/ServerController.php

@@ -132,7 +132,7 @@ class ServerController extends Controller
                 ($product->minimum_credits == -1
                 ($product->minimum_credits == -1
                     ? config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50)
                     ? config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50)
                     : $product->minimum_credits) ||
                     : $product->minimum_credits) ||
-                Auth::user()->credits <= $product->price
+                Auth::user()->credits < $product->price
             ) {
             ) {
                 return redirect()->route('servers.index')->with('error', 'You do not have the required amount of '.CREDITS_DISPLAY_NAME.' to use this product!');
                 return redirect()->route('servers.index')->with('error', 'You do not have the required amount of '.CREDITS_DISPLAY_NAME.' to use this product!');
             }
             }