mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
#591 - backups
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\ResourceCollection;
|
||||
use Inertia\Inertia;
|
||||
use Inertia\Response;
|
||||
use Spatie\RouteAttributes\Attributes\Delete;
|
||||
@ -34,6 +35,14 @@ public function index(Server $server): Response
|
||||
]);
|
||||
}
|
||||
|
||||
#[Get('/json', name: 'databases.json')]
|
||||
public function json(Server $server): ResourceCollection
|
||||
{
|
||||
$this->authorize('viewAny', [Database::class, $server]);
|
||||
|
||||
return DatabaseResource::collection($server->databases()->get());
|
||||
}
|
||||
|
||||
#[Get('/charsets', name: 'databases.charsets')]
|
||||
public function charsets(Server $server): JsonResponse
|
||||
{
|
||||
|
Reference in New Issue
Block a user