followup.
This commit is contained in:
@@ -28,7 +28,7 @@ final class Index
|
||||
$urlPath = $request->getUri()->getPath();
|
||||
|
||||
$response = [
|
||||
'data' => [],
|
||||
'backends' => [],
|
||||
'links' => [
|
||||
'self' => (string)$apiUrl,
|
||||
],
|
||||
@@ -45,7 +45,7 @@ final class Index
|
||||
'self' => (string)$apiUrl->withPath($urlPath . '/' . $backend['name']),
|
||||
];
|
||||
|
||||
$response['data'][] = $backend;
|
||||
$response['backends'][] = $backend;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
|
||||
@@ -36,7 +36,7 @@ final class View
|
||||
],
|
||||
];
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(['backend' => $response], HTTP_STATUS::HTTP_OK, []);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ final class Index
|
||||
'last_page' => @ceil($total / $perpage),
|
||||
],
|
||||
'filters' => $filters,
|
||||
'data' => [],
|
||||
'history' => [],
|
||||
'links' => [
|
||||
'self' => (string)$getUri,
|
||||
'first_url' => $firstUrl,
|
||||
@@ -311,7 +311,7 @@ final class Index
|
||||
],
|
||||
];
|
||||
|
||||
$response['data'][] = $item;
|
||||
$response['history'][] = $item;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
|
||||
@@ -46,6 +46,6 @@ final readonly class View
|
||||
],
|
||||
];
|
||||
|
||||
return api_response($item, HTTP_STATUS::HTTP_OK, []);
|
||||
return api_response(['history' => $item], HTTP_STATUS::HTTP_OK, []);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ final class Index
|
||||
$urlPath = rtrim($request->getUri()->getPath(), '/');
|
||||
|
||||
$response = [
|
||||
'data' => [],
|
||||
'tasks' => [],
|
||||
'links' => [
|
||||
'self' => (string)$apiUrl,
|
||||
],
|
||||
@@ -38,7 +38,7 @@ final class Index
|
||||
'self' => (string)$apiUrl->withPath($urlPath . '/' . ag($task, 'name')),
|
||||
];
|
||||
|
||||
$response['data'][] = $task;
|
||||
$response['tasks'][] = $task;
|
||||
}
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK, []);
|
||||
|
||||
@@ -35,6 +35,6 @@ final class View
|
||||
],
|
||||
];
|
||||
|
||||
return api_response($response, HTTP_STATUS::HTTP_OK);
|
||||
return api_response(['task' => $response], HTTP_STATUS::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user