|
1 | 1 | <?php |
2 | 2 |
|
3 | 3 | use Illuminate\Support\Facades\Route; |
| 4 | +use Pterodactyl\Http\Controllers\Api\Application; |
4 | 5 |
|
5 | 6 | /* |
6 | 7 | |-------------------------------------------------------------------------- |
|
12 | 13 | */ |
13 | 14 |
|
14 | 15 | Route::group(['prefix' => '/users'], function () { |
15 | | - Route::get('/', 'Users\UserController@index')->name('api.application.users'); |
16 | | - Route::get('/{user}', 'Users\UserController@view')->name('api.application.users.view'); |
17 | | - Route::get('/external/{external_id}', 'Users\ExternalUserController@index')->name('api.application.users.external'); |
| 16 | + Route::get('/', [Application\Users\UserController::class, 'index'])->name('api.application.users'); |
| 17 | + Route::get('/{user}', [Application\Users\UserController::class, 'view'])->name('api.application.users.view'); |
| 18 | + Route::get('/external/{external_id}', [Application\Users\ExternalUserController::class, 'index'])->name('api.application.users.external'); |
18 | 19 |
|
19 | | - Route::post('/', 'Users\UserController@store'); |
20 | | - Route::patch('/{user}', 'Users\UserController@update'); |
| 20 | + Route::post('/', [Application\Users\UserController::class, 'store']); |
| 21 | + Route::patch('/{user}', [Application\Users\UserController::class, 'update']); |
21 | 22 |
|
22 | | - Route::delete('/{user}', 'Users\UserController@delete'); |
| 23 | + Route::delete('/{user}', [Application\Users\UserController::class, 'delete']); |
23 | 24 | }); |
24 | 25 |
|
25 | 26 | /* |
|
31 | 32 | | |
32 | 33 | */ |
33 | 34 | Route::group(['prefix' => '/nodes'], function () { |
34 | | - Route::get('/', 'Nodes\NodeController@index')->name('api.application.nodes'); |
35 | | - Route::get('/deployable', 'Nodes\NodeDeploymentController'); |
36 | | - Route::get('/{node}', 'Nodes\NodeController@view')->name('api.application.nodes.view'); |
37 | | - Route::get('/{node}/configuration', 'Nodes\NodeConfigurationController'); |
| 35 | + Route::get('/', [Application\Nodes\NodeController::class, 'index'])->name('api.application.nodes'); |
| 36 | + Route::get('/deployable', Application\Nodes\NodeDeploymentController::class); |
| 37 | + Route::get('/{node}', [Application\Nodes\NodeController::class, 'view'])->name('api.application.nodes.view'); |
| 38 | + Route::get('/{node}/configuration', Application\Nodes\NodeConfigurationController::class); |
38 | 39 |
|
39 | | - Route::post('/', 'Nodes\NodeController@store'); |
40 | | - Route::patch('/{node}', 'Nodes\NodeController@update'); |
| 40 | + Route::post('/', [Application\Nodes\NodeController::class, 'store']); |
| 41 | + Route::patch('/{node}', [Application\Nodes\NodeController::class, 'update']); |
41 | 42 |
|
42 | | - Route::delete('/{node}', 'Nodes\NodeController@delete'); |
| 43 | + Route::delete('/{node}', [Application\Nodes\NodeController::class, 'delete']); |
43 | 44 |
|
44 | 45 | Route::group(['prefix' => '/{node}/allocations'], function () { |
45 | | - Route::get('/', 'Nodes\AllocationController@index')->name('api.application.allocations'); |
46 | | - Route::post('/', 'Nodes\AllocationController@store'); |
47 | | - Route::delete('/{allocation}', 'Nodes\AllocationController@delete')->name('api.application.allocations.view'); |
| 46 | + Route::get('/', [Application\Nodes\AllocationController::class, 'index'])->name('api.application.allocations'); |
| 47 | + Route::post('/', [Application\Nodes\AllocationController::class, 'store']); |
| 48 | + Route::delete('/{allocation}', [Application\Nodes\AllocationController::class, 'delete'])->name('api.application.allocations.view'); |
48 | 49 | }); |
49 | 50 | }); |
50 | 51 |
|
|
57 | 58 | | |
58 | 59 | */ |
59 | 60 | Route::group(['prefix' => '/locations'], function () { |
60 | | - Route::get('/', 'Locations\LocationController@index')->name('api.applications.locations'); |
61 | | - Route::get('/{location}', 'Locations\LocationController@view')->name('api.application.locations.view'); |
| 61 | + Route::get('/', [Application\Locations\LocationController::class, 'index'])->name('api.applications.locations'); |
| 62 | + Route::get('/{location}', [Application\Locations\LocationController::class, 'view'])->name('api.application.locations.view'); |
62 | 63 |
|
63 | | - Route::post('/', 'Locations\LocationController@store'); |
64 | | - Route::patch('/{location}', 'Locations\LocationController@update'); |
| 64 | + Route::post('/', [Application\Locations\LocationController::class, 'store']); |
| 65 | + Route::patch('/{location}', [Application\Locations\LocationController::class, 'update']); |
65 | 66 |
|
66 | | - Route::delete('/{location}', 'Locations\LocationController@delete'); |
| 67 | + Route::delete('/{location}', [Application\Locations\LocationController::class, 'delete']); |
67 | 68 | }); |
68 | 69 |
|
69 | 70 | /* |
|
75 | 76 | | |
76 | 77 | */ |
77 | 78 | Route::group(['prefix' => '/servers'], function () { |
78 | | - Route::get('/', 'Servers\ServerController@index')->name('api.application.servers'); |
79 | | - Route::get('/{server}', 'Servers\ServerController@view')->name('api.application.servers.view'); |
80 | | - Route::get('/external/{external_id}', 'Servers\ExternalServerController@index')->name('api.application.servers.external'); |
| 79 | + Route::get('/', [Application\Servers\ServerController::class, 'index'])->name('api.application.servers'); |
| 80 | + Route::get('/{server}', [Application\Servers\ServerController::class, 'view'])->name('api.application.servers.view'); |
| 81 | + Route::get('/external/{external_id}', [Application\Servers\ExternalServerController::class, 'index'])->name('api.application.servers.external'); |
81 | 82 |
|
82 | | - Route::patch('/{server}/details', 'Servers\ServerDetailsController@details')->name('api.application.servers.details'); |
83 | | - Route::patch('/{server}/build', 'Servers\ServerDetailsController@build')->name('api.application.servers.build'); |
84 | | - Route::patch('/{server}/startup', 'Servers\StartupController@index')->name('api.application.servers.startup'); |
| 83 | + Route::patch('/{server}/details', [Application\Servers\ServerDetailsController::class, 'details'])->name('api.application.servers.details'); |
| 84 | + Route::patch('/{server}/build', [Application\Servers\ServerDetailsController::class, 'build'])->name('api.application.servers.build'); |
| 85 | + Route::patch('/{server}/startup', [Application\Servers\StartupController::class, 'index'])->name('api.application.servers.startup'); |
85 | 86 |
|
86 | | - Route::post('/', 'Servers\ServerController@store'); |
87 | | - Route::post('/{server}/suspend', 'Servers\ServerManagementController@suspend')->name('api.application.servers.suspend'); |
88 | | - Route::post('/{server}/unsuspend', 'Servers\ServerManagementController@unsuspend')->name('api.application.servers.unsuspend'); |
89 | | - Route::post('/{server}/reinstall', 'Servers\ServerManagementController@reinstall')->name('api.application.servers.reinstall'); |
| 87 | + Route::post('/', [Application\Servers\ServerController::class, 'store']); |
| 88 | + Route::post('/{server}/suspend', [Application\Servers\ServerManagementController::class, 'suspend'])->name('api.application.servers.suspend'); |
| 89 | + Route::post('/{server}/unsuspend', [Application\Servers\ServerManagementController::class, 'unsuspend'])->name('api.application.servers.unsuspend'); |
| 90 | + Route::post('/{server}/reinstall', [Application\Servers\ServerManagementController::class, 'reinstall'])->name('api.application.servers.reinstall'); |
90 | 91 |
|
91 | | - Route::delete('/{server}', 'Servers\ServerController@delete'); |
92 | | - Route::delete('/{server}/{force?}', 'Servers\ServerController@delete'); |
| 92 | + Route::delete('/{server}', [Application\Servers\ServerController::class, 'delete']); |
| 93 | + Route::delete('/{server}/{force?}', [Application\Servers\ServerController::class, 'delete']); |
93 | 94 |
|
94 | 95 | // Database Management Endpoint |
95 | 96 | Route::group(['prefix' => '/{server}/databases'], function () { |
96 | | - Route::get('/', 'Servers\DatabaseController@index')->name('api.application.servers.databases'); |
97 | | - Route::get('/{database}', 'Servers\DatabaseController@view')->name('api.application.servers.databases.view'); |
| 97 | + Route::get('/', [Application\Servers\DatabaseController::class, 'index'])->name('api.application.servers.databases'); |
| 98 | + Route::get('/{database}', [Application\Servers\DatabaseController::class, 'view'])->name('api.application.servers.databases.view'); |
98 | 99 |
|
99 | | - Route::post('/', 'Servers\DatabaseController@store'); |
100 | | - Route::post('/{database}/reset-password', 'Servers\DatabaseController@resetPassword'); |
| 100 | + Route::post('/', [Application\Servers\DatabaseController::class, 'store']); |
| 101 | + Route::post('/{database}/reset-password', [Application\Servers\DatabaseController::class, 'resetPassword']); |
101 | 102 |
|
102 | | - Route::delete('/{database}', 'Servers\DatabaseController@delete'); |
| 103 | + Route::delete('/{database}', [Application\Servers\DatabaseController::class, 'delete']); |
103 | 104 | }); |
104 | 105 | }); |
105 | 106 |
|
|
112 | 113 | | |
113 | 114 | */ |
114 | 115 | Route::group(['prefix' => '/nests'], function () { |
115 | | - Route::get('/', 'Nests\NestController@index')->name('api.application.nests'); |
116 | | - Route::get('/{nest}', 'Nests\NestController@view')->name('api.application.nests.view'); |
| 116 | + Route::get('/', [Application\Nests\NestController::class, 'index'])->name('api.application.nests'); |
| 117 | + Route::get('/{nest}', [Application\Nests\NestController::class, 'view'])->name('api.application.nests.view'); |
117 | 118 |
|
118 | 119 | // Egg Management Endpoint |
119 | 120 | Route::group(['prefix' => '/{nest}/eggs'], function () { |
120 | | - Route::get('/', 'Nests\EggController@index')->name('api.application.nests.eggs'); |
121 | | - Route::get('/{egg}', 'Nests\EggController@view')->name('api.application.nests.eggs.view'); |
| 121 | + Route::get('/', [Application\Nests\EggController::class, 'index'])->name('api.application.nests.eggs'); |
| 122 | + Route::get('/{egg}', [Application\Nests\EggController::class, 'view'])->name('api.application.nests.eggs.view'); |
122 | 123 | }); |
123 | 124 | }); |
0 commit comments