28 lines
606 B
PHP
28 lines
606 B
PHP
<?php
|
|
// phpcs:disable PEAR.Commenting.FileComment,PEAR.Commenting.ClassComment
|
|
|
|
/**
|
|
* Return the full board state for a project.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
$boardService = include __DIR__ . '/_bootstrap.php';
|
|
|
|
use IronKanban\Support\Http;
|
|
use IronKanban\Support\HttpHalt;
|
|
|
|
try {
|
|
$projectId = trim((string) ($_GET['project'] ?? ''));
|
|
|
|
if ($projectId === '') {
|
|
Http::error('project_required', 422);
|
|
}
|
|
|
|
Http::json($boardService->getBoardState($projectId));
|
|
} catch (HttpHalt $halt) {
|
|
return;
|
|
} catch (Throwable $exception) {
|
|
Http::error($exception->getMessage(), 500);
|
|
}
|