mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
fix:Model doc information in api document is wrong(#161)
This commit is contained in:
+2
-2
@@ -61,7 +61,7 @@ func GetDept(c *gin.Context) {
|
||||
// @Tags 部门
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param data body models.Dept true "data"
|
||||
// @Param data body models.SysDept true "data"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||
// @Router /api/v1/dept [post]
|
||||
@@ -82,7 +82,7 @@ func InsertDept(c *gin.Context) {
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param id path int true "id"
|
||||
// @Param data body models.Dept true "body"
|
||||
// @Param data body models.SysDept true "body"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||
// @Router /api/v1/dept [put]
|
||||
|
||||
+2
-2
@@ -82,7 +82,7 @@ func InsertPost(c *gin.Context) {
|
||||
// @Tags 岗位
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param data body models.Dept true "body"
|
||||
// @Param data body models.Post true "body"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||
// @Router /api/v1/post/ [put]
|
||||
@@ -103,7 +103,7 @@ func UpdatePost(c *gin.Context) {
|
||||
// @Tags 岗位
|
||||
// @Param id path int true "id"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "删除失败"}"
|
||||
// @Success 500 {string} string "{"code": 500, "message": "删除失败"}"
|
||||
// @Router /api/v1/post/{postId} [delete]
|
||||
func DeletePost(c *gin.Context) {
|
||||
var data models.Post
|
||||
|
||||
@@ -24,11 +24,11 @@ func GetSysTableList(c *gin.Context) {
|
||||
var pageIndex = 1
|
||||
|
||||
if size := c.Request.FormValue("pageSize"); size != "" {
|
||||
pageSize = tools2.StrToInt(err, size)
|
||||
pageSize, err = tools2.StringToInt(size)
|
||||
}
|
||||
|
||||
if index := c.Request.FormValue("pageIndex"); index != "" {
|
||||
pageIndex = tools2.StrToInt(err, index)
|
||||
pageIndex, err = tools2.StringToInt(index)
|
||||
}
|
||||
|
||||
data.TBName = c.Request.FormValue("tableName")
|
||||
@@ -185,7 +185,7 @@ func genTableInit(tablesList []string, i int, c *gin.Context) (tools.SysTables,
|
||||
// @Tags 工具 - 生成表
|
||||
// @Accept application/json
|
||||
// @Product application/json
|
||||
// @Param data body models.Dept true "body"
|
||||
// @Param data body tools.SysTables true "body"
|
||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||
// @Router /api/v1/sys/tables/info [put]
|
||||
|
||||
Reference in New Issue
Block a user