Include project’s description in API response.

This commit is contained in:
Matt Stein
2024-09-09 09:44:43 -07:00
parent 44d417c07e
commit f73983e3dd
2 changed files with 2 additions and 1 deletions

View File

@@ -46,7 +46,7 @@ class ProjectController extends Controller
if (is_null($teamId)) { if (is_null($teamId)) {
return invalidTokenResponse(); return invalidTokenResponse();
} }
$projects = Project::whereTeamId($teamId)->select('id', 'name', 'uuid')->get(); $projects = Project::whereTeamId($teamId)->select('id', 'name', 'description', 'uuid')->get();
return response()->json(serializeApiResponse($projects), return response()->json(serializeApiResponse($projects),
); );

View File

@@ -11,6 +11,7 @@ use OpenApi\Attributes as OA;
'id' => ['type' => 'integer'], 'id' => ['type' => 'integer'],
'uuid' => ['type' => 'string'], 'uuid' => ['type' => 'string'],
'name' => ['type' => 'string'], 'name' => ['type' => 'string'],
'description' => ['type' => 'string'],
'environments' => new OA\Property( 'environments' => new OA\Property(
property: 'environments', property: 'environments',
type: 'array', type: 'array',