fix: standardize JSON response format in TextWidgetController and update related tests

This commit is contained in:
jon brookes 2026-01-15 18:02:04 +00:00
parent 224654cabf
commit d715a177bd
2 changed files with 7 additions and 2 deletions

View file

@ -14,7 +14,9 @@ class TextWidgetController extends Controller
*/
public function index()
{
return TextWidget::with('category')->get()->map(fn ($tw) => new TextWidgetResource($tw));
return response()->json([
'data' => TextWidget::with('category')->get()->map(fn ($tw) => new TextWidgetResource($tw))
]);
}
/**