mirror of
https://github.com/pelican-dev/panel.git
synced 2026-02-26 11:33:52 +03:00
Very rough go at getting API back into operational state.
Not spending a lot of time on this as its a pre-release and I have plans to overhaul the API to actually work and be easy to maintain.
This commit is contained in:
@@ -27,26 +27,15 @@ 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)
|
||||
* @param Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function lists(Request $request)
|
||||
public function index(Request $request)
|
||||
{
|
||||
return Location::with('nodes')->get()->map(function ($item) {
|
||||
$item->nodes->transform(function ($item) {
|
||||
|
||||
Reference in New Issue
Block a user