diff --git a/app/Http/Controllers/Api/Client/Servers/DatabaseController.php b/app/Http/Controllers/Api/Client/Servers/DatabaseController.php index bda75a37..d440f321 100644 --- a/app/Http/Controllers/Api/Client/Servers/DatabaseController.php +++ b/app/Http/Controllers/Api/Client/Servers/DatabaseController.php @@ -4,6 +4,7 @@ namespace Pterodactyl\Http\Controllers\Api\Client\Servers; use Illuminate\Http\Response; use Pterodactyl\Models\Server; +use Pterodactyl\Models\Database; use Pterodactyl\Transformers\Api\Client\DatabaseTransformer; use Pterodactyl\Services\Databases\DatabaseManagementService; use Pterodactyl\Services\Databases\DeployServerDatabaseService; @@ -88,7 +89,8 @@ class DatabaseController extends ClientApiController */ public function delete(DeleteDatabaseRequest $request): Response { + $this->managementService->delete($request->getModel(Database::class)->id); + return Response::create('', Response::HTTP_NO_CONTENT); -// $this->managementService->delete($request->input('database')); } } diff --git a/resources/assets/scripts/components/server/components/CreateDatabaseModal.vue b/resources/assets/scripts/components/server/components/database/CreateDatabaseModal.vue similarity index 98% rename from resources/assets/scripts/components/server/components/CreateDatabaseModal.vue rename to resources/assets/scripts/components/server/components/database/CreateDatabaseModal.vue index 81cefad1..11072696 100644 --- a/resources/assets/scripts/components/server/components/CreateDatabaseModal.vue +++ b/resources/assets/scripts/components/server/components/database/CreateDatabaseModal.vue @@ -31,7 +31,7 @@ diff --git a/resources/assets/scripts/components/server/components/database/DeleteDatabaseModal.vue b/resources/assets/scripts/components/server/components/database/DeleteDatabaseModal.vue new file mode 100644 index 00000000..aed842d8 --- /dev/null +++ b/resources/assets/scripts/components/server/components/database/DeleteDatabaseModal.vue @@ -0,0 +1,81 @@ + + + + diff --git a/resources/assets/scripts/components/server/subpages/Databases.vue b/resources/assets/scripts/components/server/subpages/Databases.vue index c6c1fa75..8a39a656 100644 --- a/resources/assets/scripts/components/server/subpages/Databases.vue +++ b/resources/assets/scripts/components/server/subpages/Databases.vue @@ -12,39 +12,7 @@
-
-
- -
-

Database Name

-

{{database.name}}

-
-
-

Username

-

{{database.username}}

-
-
-

Password

-

- - - •••••• - - {{database.password}} - -

-
-
-

Server

-

{{database.host.address}}:{{database.host.port}}

-
-
- -
-
-
+
@@ -62,12 +30,14 @@