mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-28 15:27:24 +08:00
revert api() wrap with data when non JsonResource
This commit is contained in:
@@ -542,8 +542,6 @@ function api(...$args)
|
|||||||
}
|
}
|
||||||
if ($data instanceof \Illuminate\Http\Resources\Json\JsonResource) {
|
if ($data instanceof \Illuminate\Http\Resources\Json\JsonResource) {
|
||||||
$data = $data->response()->getData(true);
|
$data = $data->response()->getData(true);
|
||||||
} else {
|
|
||||||
$data = ['data' => $data];
|
|
||||||
}
|
}
|
||||||
// dd($data);
|
// dd($data);
|
||||||
$time = (float)number_format(microtime(true) - nexus()->getStartTimestamp(), 3);
|
$time = (float)number_format(microtime(true) - nexus()->getStartTimestamp(), 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user