mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-09 09:53:44 +02:00
Add more API routes
Servers: list all, list single Nodes: list all, list single, list single allocations, add node Locations: list all
This commit is contained in:
33
app/Http/Controllers/API/LocationController.php
Normal file
33
app/Http/Controllers/API/LocationController.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Controllers\API;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Models\Location;
|
||||
|
||||
/**
|
||||
* @Resource("Servers")
|
||||
*/
|
||||
class LocationController extends BaseController
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* List All Locations
|
||||
*
|
||||
* Lists all locations currently on the system.
|
||||
*
|
||||
* @Get("/locations")
|
||||
* @Versions({"v1"})
|
||||
* @Response(200)
|
||||
*/
|
||||
public function getLocations(Request $request)
|
||||
{
|
||||
return Location::all();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user