修复获取第三方绑定Url问题

This commit is contained in:
junleea 2025-04-27 10:57:54 +08:00
parent ba553984e4
commit 13e115f2e0
1 changed files with 5 additions and 0 deletions

View File

@ -723,15 +723,20 @@ func GetThirdPartyAuthUrl(c *gin.Context) {
if hType == "add" {
//查看是否已经绑定
token := c.Request.Header.Get("token")
if token == "" {
token = c.Query("token")
}
if token == "" {
resp.Code = proto.ParameterError
resp.Message = "token is empty"
c.JSON(http.StatusOK, resp)
return
}
userID, err := service.DecodeJWTToken(token)
if err != nil {
resp.Code = proto.ParameterError
resp.Message = err.Error()
c.JSON(http.StatusOK, resp)
return
}
//需要将uuid绑定在该用户上