Skip to content

Commit

Permalink
v8.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
simplewindorg committed Sep 27, 2023
1 parent 4efadc8 commit b7f747c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ThinkCMF核心API扩展
===============

## 更新日志
### v8.0.4
* 规范API返回格式

### v8.0.3
* 规范API返回格式

Expand Down
9 changes: 5 additions & 4 deletions src/admin/controller/PluginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class PluginController extends RestAdminBaseController
* response="1",
* description="success",
* @OA\JsonContent(example={"code": 1,"msg": "success","data":{
* "plugins":{
* {"id": 1,"status": 1,"delete_time": 0,"name": "又菜又爱玩","remark": ""}
* }
* "list":{
* {"id":39,"type":1,"has_admin":1,"status":1,"create_time":0,"name":"Swagger","title":"Swagger","demo_url":"http://demo.thinkcmf.com","hooks":"","author":"ThinkCMF","author_url":"http://www.thinkcmf.com","version":"2.0.0","description":"Swagger4.0支持PHP版本>=8.1,同时支持Attributes和Annotations","config":{}}
* },"total":1
* }})
* ),
* @OA\Response(
Expand All @@ -46,7 +46,8 @@ public function index()
{
$pluginModel = new PluginModel();
$plugins = $pluginModel->getList();
$this->success("success", ['plugins' => $plugins]);
$plugins = array_values($plugins);
$this->success("success", ['plugins' => $plugins, 'total' => count($plugins)]);
}

/**
Expand Down

0 comments on commit b7f747c

Please sign in to comment.