fix: standardize JSON response format in TextWidgetController and update related tests
This commit is contained in:
parent
224654cabf
commit
d715a177bd
2 changed files with 7 additions and 2 deletions
|
|
@ -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))
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue