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>
|
||||
`, l.redirectUrl)
|
||||
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) {
|
||||
|
@ -108,8 +104,8 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
|
|||
log.Println(r.Json())
|
||||
|
||||
googleId := r.Json().Get("id").Int()
|
||||
l.redirectUrl = "http://localhost:9900/oauth?token=21321123"
|
||||
return resp.Set(304, "21321321")
|
||||
// l.redirectUrl = "http://localhost:9900/oauth?token=21321123"
|
||||
// return resp.Set(304, "21321321")
|
||||
user, err := l.svcCtx.AllModels.FsUser.FindUserByGoogleId(context.TODO(), googleId)
|
||||
log.Println(user)
|
||||
if err != nil {
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package config
|
||||
|
||||
import "github.com/zeromicro/go-zero/rest"
|
||||
import (
|
||||
"fusenapi/server/render/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RestConf
|
||||
|
|
Loading…
Reference in New Issue
Block a user