|
@@ -45,9 +45,6 @@ func Auth(c *gin.Context) {
|
|
|
appG := app.Gin{C: c}
|
|
|
var reqInfo auth
|
|
|
err := c.BindJSON(&reqInfo)
|
|
|
- //c.Request.ParseForm()
|
|
|
- //reqInfo.Username = c.PostForm("username")
|
|
|
- //reqInfo.Password = c.PostForm("pwd")
|
|
|
|
|
|
valid := validation.Validation{}
|
|
|
valid.MaxSize(reqInfo.Username, 100, "username").Message("最长为100字符")
|
|
@@ -148,7 +145,7 @@ func UserLogout(c *gin.Context) {
|
|
|
// @Router /authdata/userinfo [GET]
|
|
|
func GetUserinfo(c *gin.Context) {
|
|
|
appG := app.Gin{C: c}
|
|
|
- data := restful.GetUserInfo(c.Param("jwt_username"))
|
|
|
+ data := restful.GetUserInfo(appG.Get("jwt_username"))
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, data)
|
|
|
}
|
|
|
|