mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 15:23:44 +02:00
Model fixing, moving things around to improve code.
Adds unique UUID generator, moves functions into repositories for adding servers and users, cleans up code, adding more comments.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Pterodactyl\Http\Controllers\Admin;
|
||||
|
||||
use Debugbar;
|
||||
use Pterodactyl\Repositories\ServerRepository;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Models\Location;
|
||||
@@ -56,7 +57,8 @@ class ServersController extends Controller
|
||||
{
|
||||
|
||||
try {
|
||||
$resp = Server::addServer($request->all());
|
||||
$server = new ServerRepository;
|
||||
$resp = $server->create($request->all());
|
||||
echo $resp . '<br />';
|
||||
} catch (\Exception $e) {
|
||||
Debugbar::addException($e);
|
||||
|
||||
Reference in New Issue
Block a user