fix
This commit is contained in:
parent
f4def7f8a0
commit
72a6412eed
@ -60,10 +60,6 @@ func (l *UserGoogleLoginLogic) AfterLogic(w http.ResponseWriter, r *http.Request
|
|||||||
</html>
|
</html>
|
||||||
`, l.redirectUrl)
|
`, l.redirectUrl)
|
||||||
fmt.Fprintln(w, html)
|
fmt.Fprintln(w, html)
|
||||||
|
|
||||||
// if l.redirectUrl != "" {
|
|
||||||
// http.Redirect(w, r, "http://localhost:9900/api/assistant/redirect?url="+url.QueryEscape(l.redirectUrl), http.StatusFound)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, userinfo *auth.UserInfo) (resp *basic.Response) {
|
func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, userinfo *auth.UserInfo) (resp *basic.Response) {
|
||||||
@ -108,8 +104,8 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
|
|||||||
log.Println(r.Json())
|
log.Println(r.Json())
|
||||||
|
|
||||||
googleId := r.Json().Get("id").Int()
|
googleId := r.Json().Get("id").Int()
|
||||||
l.redirectUrl = "http://localhost:9900/oauth?token=21321123"
|
// l.redirectUrl = "http://localhost:9900/oauth?token=21321123"
|
||||||
return resp.Set(304, "21321321")
|
// return resp.Set(304, "21321321")
|
||||||
user, err := l.svcCtx.AllModels.FsUser.FindUserByGoogleId(context.TODO(), googleId)
|
user, err := l.svcCtx.AllModels.FsUser.FindUserByGoogleId(context.TODO(), googleId)
|
||||||
log.Println(user)
|
log.Println(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import "github.com/zeromicro/go-zero/rest"
|
import (
|
||||||
|
"fusenapi/server/render/internal/types"
|
||||||
|
|
||||||
|
"github.com/zeromicro/go-zero/rest"
|
||||||
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
rest.RestConf
|
rest.RestConf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user