Skip to content

Commit

Permalink
update swagger and fix task api
Browse files Browse the repository at this point in the history
  • Loading branch information
mhxw committed Oct 25, 2022
1 parent 9898e85 commit 1dc8a93
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apis/log/loginLog.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func GetLoginLog(c *gin.Context) {
// @Tags 登录日志
// @Accept application/json
// @Product application/json
// @Param data body models.LoginLog true "data"
// @Param data body system.LoginLog true "data"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/loginlog [post]
Expand All @@ -115,7 +115,7 @@ func InsertLoginLog(c *gin.Context) {
// @Tags 登录日志
// @Accept application/json
// @Product application/json
// @Param data body models.LoginLog true "body"
// @Param data body system.LoginLog true "body"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/loginlog [put]
Expand Down
2 changes: 1 addition & 1 deletion apis/process/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func UpdateTask(c *gin.Context) {
// 删除任务
func DeleteTask(c *gin.Context) {
fullName := c.DefaultQuery("full_name", "")
if fullName == "" || Strings.Contains(fullName, "/") {
if fullName == "" || strings.Contains(fullName, "/") {
app.Error(c, -1, errors.New("参数不正确,请确定参数full_name是否传递"), "")
return
}
Expand Down
4 changes: 2 additions & 2 deletions apis/system/dept.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func GetDept(c *gin.Context) {
// @Tags 部门
// @Accept application/json
// @Product application/json
// @Param data body models.Dept true "data"
// @Param data body system.Dept true "data"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/dept [post]
Expand All @@ -134,7 +134,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 system.Dept true "body"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/dept [put]
Expand Down
2 changes: 1 addition & 1 deletion apis/system/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func InsertMenu(c *gin.Context) {
// @Accept application/x-www-form-urlencoded
// @Product application/x-www-form-urlencoded
// @Param id path int true "id"
// @Param data body models.Menu true "body"
// @Param data body system.Menu true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Success 200 {string} string "{"code": -1, "message": "修改失败"}"
// @Router /api/v1/menu/{id} [put]
Expand Down
4 changes: 2 additions & 2 deletions apis/system/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func GetPost(c *gin.Context) {
// @Tags 职位
// @Accept application/json
// @Product application/json
// @Param data body models.Post true "data"
// @Param data body system.Post true "data"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/post [post]
Expand All @@ -105,7 +105,7 @@ func InsertPost(c *gin.Context) {
// @Tags 职位
// @Accept application/json
// @Product application/json
// @Param data body models.Dept true "body"
// @Param data body system.Dept true "body"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/post/ [put]
Expand Down
4 changes: 2 additions & 2 deletions apis/system/role.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func GetRole(c *gin.Context) {
// @Tags 角色/Role
// @Accept application/json
// @Product application/json
// @Param data body models.SysRole true "data"
// @Param data body system.SysRole true "data"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/role [post]
Expand Down Expand Up @@ -119,7 +119,7 @@ func InsertRole(c *gin.Context) {
// @Tags 角色/Role
// @Accept application/json
// @Product application/json
// @Param data body models.SysRole true "body"
// @Param data body system.SysRole true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Success 200 {string} string "{"code": -1, "message": "修改失败"}"
// @Router /api/v1/role [put]
Expand Down
4 changes: 2 additions & 2 deletions apis/system/sysuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func GetSysUserInit(c *gin.Context) {
// @Tags 用户
// @Accept application/json
// @Product application/json
// @Param data body models.SysUser true "用户数据"
// @Param data body system.SysUser true "用户数据"
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
// @Router /api/v1/sysUser [post]
Expand All @@ -210,7 +210,7 @@ func InsertSysUser(c *gin.Context) {
// @Tags 用户
// @Accept application/json
// @Product application/json
// @Param data body models.SysUser true "body"
// @Param data body system.SysUser true "body"
// @Success 200 {string} string "{"code": 200, "message": "修改成功"}"
// @Success 200 {string} string "{"code": -1, "message": "修改失败"}"
// @Router /api/v1/sysuser/{userId} [put]
Expand Down
2 changes: 1 addition & 1 deletion handler/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func IdentityHandler(c *gin.Context) interface{} {
// Reply will be of the form {"token": "TOKEN"}.
// @Accept application/json
// @Product application/json
// @Param username body models.Login true "Add account"
// @Param username body system.Login true "Add account"
// @Success 200 {string} string "{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token": ".eyJleHAiOjE1NjUxNTMxNDgsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU2NTE0OTU0OH0.-zvzHvbg0A" }"
// @Router /login [post]
func Authenticator(c *gin.Context) (interface{}, error) {
Expand Down

0 comments on commit 1dc8a93

Please sign in to comment.