diff --git a/QMPlusServer/controller/api/api.go b/QMPlusServer/controller/api/api.go index b1902e5f86b23efdce1cbf681e0c9594673b7bd4..881a75f3a8e2cac55c030567949c282e908f6529 100644 --- a/QMPlusServer/controller/api/api.go +++ b/QMPlusServer/controller/api/api.go @@ -57,9 +57,10 @@ func DeleteApi(c *gin.Context) { } type AuthAndPathIn struct { - AuthorityId string `json:"authorityId"` - Apis []dbModel.Api `json:"apis"` + AuthorityId string `json:"authorityId"` + Apis []dbModel.Api `json:"apis"` } + // @Tags Api // @Summary 创建api和角色关系 // @Security ApiKeyAuth @@ -68,10 +69,10 @@ type AuthAndPathIn struct { // @Param data body api.AuthAndPathIn true "创建api和角色关系" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /api/setAuthAndPath [post] -func SetAuthAndPath(c *gin.Context){ +func SetAuthAndPath(c *gin.Context) { var authAndPathIn AuthAndPathIn _ = c.BindJSON(&authAndPathIn) - err:=new(dbModel.ApiAuthority).SetAuthAndPath(authAndPathIn.AuthorityId,authAndPathIn.Apis) + err := new(dbModel.ApiAuthority).SetAuthAndPath(authAndPathIn.AuthorityId, authAndPathIn.Apis) if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("添加失败:%v", err), gin.H{}) } else { @@ -79,7 +80,7 @@ func SetAuthAndPath(c *gin.Context){ } } -// @Tags api +// @Tags Api // @Summary 分页获取角色列表 // @Security ApiKeyAuth // @accept application/json @@ -95,11 +96,11 @@ func GetApiList(c *gin.Context) { servers.ReportFormat(c, false, fmt.Sprintf("获取数据失败,%v", err), gin.H{}) } else { servers.ReportFormat(c, true, "获取数据成功", gin.H{ - "list": list, + "list": list, "total": total, "page": pageInfo.Page, "pageSize": pageInfo.PageSize, }) } -} \ No newline at end of file +} diff --git a/QMPlusServer/docs/docs.go b/QMPlusServer/docs/docs.go index f31241d596e65ddc8a7bdf89c581d797e4e75200..84e34d23f8a8145ef823c48f670613095d5fa86c 100644 --- a/QMPlusServer/docs/docs.go +++ b/QMPlusServer/docs/docs.go @@ -1,6 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at -// 2019-09-21 22:57:49.3172136 +0800 CST m=+0.048845201 +// 2019-09-22 15:52:19.9796956 +0800 CST m=+0.472771301 package docs @@ -118,7 +118,7 @@ var doc = `{ "application/json" ], "tags": [ - "api" + "Api" ], "summary": "分页获取角色列表", "parameters": [ diff --git a/QMPlusServer/docs/swagger.json b/QMPlusServer/docs/swagger.json index 3469d4fa1e0adfb59956c6021db093b48fef4e0e..07a0cca20f669d581b42fa9aee43c84e90edeeb7 100644 --- a/QMPlusServer/docs/swagger.json +++ b/QMPlusServer/docs/swagger.json @@ -101,7 +101,7 @@ "application/json" ], "tags": [ - "api" + "Api" ], "summary": "分页获取角色列表", "parameters": [ diff --git a/QMPlusServer/docs/swagger.yaml b/QMPlusServer/docs/swagger.yaml index 879896debed88be22bad81dfc4c00d9204a770e7..e89bc9777e63212fec1814cab9c9a19c6b93728b 100644 --- a/QMPlusServer/docs/swagger.yaml +++ b/QMPlusServer/docs/swagger.yaml @@ -180,7 +180,7 @@ paths: - ApiKeyAuth: [] summary: 分页获取角色列表 tags: - - api + - Api /api/setAuthAndPath: post: consumes: