mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 22:03:44 +02:00
More logic for deleting databases
This commit is contained in:
@@ -18,15 +18,10 @@ class DeleteDatabaseRequest extends ClientApiRequest implements ClientPermission
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the provided database even belongs to this server instance.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
$server = $this->getModel(Server::class);
|
||||
$database = $this->getModel(Database::class);
|
||||
|
||||
return $database->server_id === $server->id;
|
||||
return $this->getModel(Server::class)->id === $this->getModel(Database::class)->server_id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user