Merge commit '3d149fedf45472eff92910324974c762fc37dad6'

This commit is contained in:
Laisky.Cai
2024-04-21 15:05:13 +00:00
45 changed files with 649 additions and 223 deletions

View File

@@ -3,14 +3,16 @@ package auth
import (
"encoding/json"
"fmt"
"github.com/Laisky/errors/v2"
"github.com/Laisky/one-api/common/config"
"github.com/Laisky/one-api/controller"
"github.com/Laisky/one-api/model"
"github.com/gin-gonic/gin"
"net/http"
"strconv"
"time"
"github.com/Laisky/errors/v2"
"github.com/Laisky/one-api/common/config"
"github.com/Laisky/one-api/common/ctxkey"
"github.com/Laisky/one-api/controller"
"github.com/Laisky/one-api/model"
"github.com/gin-gonic/gin"
)
type wechatLoginResponse struct {
@@ -136,7 +138,7 @@ func WeChatBind(c *gin.Context) {
})
return
}
id := c.GetInt("id")
id := c.GetInt(ctxkey.Id)
user := model.User{
Id: id,
}