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:
parent
4e916cbf08
commit
5e27772fef
7 changed files with 189 additions and 333 deletions
|
@ -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 a new issue