Skip to content

Commit ddd802f

Browse files
committed
订正了swagger
修改了 - server/api/v1/sys_initdb.go - server/api/v1/sys_system.go 迁移了模型 - server/model/sys_init.go -> sysver/model/request/sys_init.go
1 parent ae42da9 commit ddd802f

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

server/api/v1/sys_initdb.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ import (
1313

1414
// @Tags InitDB
1515
// @Summary 初始化用户数据库
16-
// @Security ApiKeyAuth
1716
// @Produce application/json
18-
// @Param data body request.Empty true ""
19-
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
20-
// @Router /init/db [post]
17+
// @Param data body request.InitDB true "初始化数据库参数"
18+
// @Success 200 {string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}"
19+
// @Router /initdb [post]
2120
func InitDB(c *gin.Context) {
2221
if global.GVA_DB != nil {
2322
global.GVA_LOG.Error("非法访问")

server/api/v1/sys_system.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ func SetSystemConfig(c *gin.Context) {
5151
// @Summary 重启系统
5252
// @Security ApiKeyAuth
5353
// @Produce application/json
54-
// @Param data body model.System true "重启系统"
55-
// @Success 200 {string} string "{"success":true,"data":{},"msg":"重启系统成功"}"
56-
// @Router /system/ReloadSystem [post]
54+
// @Success 200 {string} string "{"code":0,"data":{},"msg":"重启系统成功"}"
55+
// @Router /system/reloadSystem [post]
5756
func ReloadSystem(c *gin.Context) {
5857
if runtime.GOOS == "windows" {
5958
response.FailWithMessage("系统不支持", c)

server/model/sys_init.go renamed to server/model/request/sys_init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package model
1+
package request
22

33
type InitDB struct {
44
Host string `json:"host"`

0 commit comments

Comments
 (0)