diff --git a/handler/wechat-handler.go b/handler/wechat-handler.go index 6a4160f..84adb8f 100644 --- a/handler/wechat-handler.go +++ b/handler/wechat-handler.go @@ -34,14 +34,7 @@ func WechatAuth(c *gin.Context) { }) return } - code := c.Query("code") - if code == "" { - c.JSON(http.StatusBadRequest, gin.H{ - "error": "code is required", - }) - return - } - resp, err := service.WechatAuth(&reqid, &code) + resp, err := service.WechatAuth(&reqid) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{ "error": err.Error(),