✨feature: Initial MVP
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?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);
|
||||
}
|
||||
Reference in New Issue
Block a user