You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/app/Controllers/CloudAdminOperationsControl...

27 lines
886 B
PHP

<?php
namespace App\Controllers;
use App\Services\Cloud\CloudAccess;
use App\Services\Cloud\CloudAdminOperationsService;
/** Read-only operations inventory. Errors are handled by CloudApi middleware. */
final class CloudAdminOperationsController
{
public function index($request, $response)
{
return $response->withJson(CloudAdminOperationsService::page(
$request->getAttribute('cloud_actor') ?? CloudAccess::actor(false),
$request->getQueryParams()
))->withHeader('Cache-Control', 'private, no-store');
}
public function detail($request, $response, $args)
{
return $response->withJson(CloudAdminOperationsService::detail(
$request->getAttribute('cloud_actor') ?? CloudAccess::actor(false),
(string) ($args['id'] ?? '')
))->withHeader('Cache-Control', 'private, no-store');
}
}