verify dbt tableName exist when add
| | |
| | | if b { |
| | | util.ResponseFormat(c,code.AddSuccess, data) |
| | | } else { |
| | | util.ResponseFormat(c,code.ComError,"新增失败") |
| | | util.ResponseFormat(c,code.ComError, data) |
| | | } |
| | | } |
| | | |
| | |
| | | c.JSON(http.StatusOK,"退出成功") |
| | | } |
| | | |
| | | // @Summary 查找所有用户 |
| | | // @Description 查找所有用户 |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags 用户 |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-u/users/findAllUser [get] |
| | | func (uc UserController) FindAllUser(c *gin.Context) { |
| | | var api dbapi.UserApi |
| | |
| | | // @Accept json |
| | | // @Produce json |
| | | // @Tags 用户 |
| | | // @Param userVo body UserEditVo true "用户编辑信息" |
| | | // @Param userVo body controllers.UserEditVo true "用户编辑信息" |
| | | // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}" |
| | | // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}" |
| | | // @Router /data/api-v/users/edit [post] |
| | |
| | | "github.com/gin-gonic/gin" |
| | | "net/http" |
| | | "strings" |
| | | "webserver/extend/code" |
| | | "webserver/extend/config" |
| | | "basic.com/valib/logger.git" |
| | | "webserver/extend/util" |
| | | ) |
| | | |
| | | const ( |
| | |
| | | urlPath := c.Request.URL.Path |
| | | |
| | | if strings.Contains(urlPath,"/data/api-v") && !strings.Contains(urlPath,"login"){ |
| | | //jwtDriver :=NewJwtAuthDriver() |
| | | //if !jwtDriver.Check(c) { |
| | | // util.ResponseFormat(c,code.TokenNotFound,"尚未登录,请登录") |
| | | // c.Abort() |
| | | //} |
| | | jwtDriver :=NewJwtAuthDriver() |
| | | if !jwtDriver.Check(c) { |
| | | util.ResponseFormat(c,code.TokenNotFound,"尚未登录,请登录") |
| | | c.Abort() |
| | | } |
| | | c.Next() |
| | | } else if strings.Contains(urlPath,"/httpImage") { |
| | | domain := config.Server.PublicDomain |