Fixed UUID on node creation

Fixed nodes not getting a UUID during creation causing a 500

Closes https://github.com/pterodactyl/panel/issues/1930
This commit is contained in:
AreYouScared 2020-04-16 20:47:53 -04:00
parent b95ec0ca41
commit 93a62ac637

View file

@ -2,6 +2,7 @@
namespace Pterodactyl\Services\Nodes;
use Ramsey\Uuid\Uuid;
use Illuminate\Support\Str;
use Pterodactyl\Models\Node;
use Illuminate\Encryption\Encrypter;
@ -41,6 +42,7 @@ class NodeCreationService
*/
public function handle(array $data)
{
$data['uuid'] = Uuid::uuid4()->toString();
$data['daemon_token'] = $this->encrypter->encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH));
$data['daemon_token_id'] = Str::random(Node::DAEMON_TOKEN_ID_LENGTH);