update swagger and fix task api
This commit is contained in:
parent
9898e85186
commit
1dc8a9399e
@ -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]
|
||||
@ -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]
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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]
|
||||
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
@ -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]
|
||||
|
@ -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]
|
||||
@ -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]
|
||||
|
@ -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]
|
||||
@ -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]
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user