Files
IronKanban/public/api/board-state.php
T
Keith Solomon 812e5c2f2a feature: Initial MVP
2026-04-05 16:20:39 -05:00

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);
}