Add template context to API and MCP project payloads

This commit is contained in:
2026-09-08 10:25:52 +00:00
committed by Twyco
parent 831014f7fe
commit b8a1d65122
5 changed files with 165 additions and 1 deletions
@@ -28,6 +28,7 @@ class ProjectTemplateResource extends JsonResource
'slug' => $this->slug,
'is_published' => $this->is_published,
'copy_areas' => $this->copy_areas ?? [],
'configuration_snapshot' => $this->configuration_snapshot ?? [],
'created_at' => $this->created_at?->toISOString(),
'updated_at' => $this->updated_at?->toISOString(),
];
@@ -42,6 +43,7 @@ class ProjectTemplateResource extends JsonResource
'slug' => Arr::get($this->resource, 'slug'),
'is_published' => Arr::get($this->resource, 'is_published', true),
'copy_areas' => Arr::get($this->resource, 'copy_areas', []),
'configuration_snapshot' => Arr::get($this->resource, 'configuration_snapshot', []),
'created_at' => Arr::get($this->resource, 'created_at'),
'updated_at' => Arr::get($this->resource, 'updated_at'),
];