save
This commit is contained in:
parent
8292b848d2
commit
ef4834517c
@ -70,25 +70,6 @@ class PluginController extends Base
|
||||
return json(['code' => 0, 'msg' => 'ok', 'data' => $items, 'count' => $count]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 摘要
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function schema(Request $request): Response
|
||||
{
|
||||
$client = $this->httpClient();
|
||||
$response = $client->get('/api/app/schema', ['query' => $request->get()]);
|
||||
$data = json_decode((string)$response->getBody(), true);
|
||||
$result = $data['data'];
|
||||
foreach ($result as &$item) {
|
||||
$item['field'] = $item['field'] ?? $item['dataIndex'];
|
||||
unset($item['dataIndex']);
|
||||
}
|
||||
return $this->json(0, 'ok', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 安装
|
||||
* @param Request $request
|
||||
|
Loading…
Reference in New Issue
Block a user