Compare commits

..

No commits in common. "fd908ec72b192bf73dcf25cda291442a5bb51acc" and "b35278771e8cac75ea7fad08c48c823799ddb98e" have entirely different histories.

2 changed files with 3 additions and 9 deletions

View File

@ -214,16 +214,14 @@ func OAuth2Callback(ctx *gin.Context) {
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
return
}
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
if err != nil {
zap.L().Info("OAuth2Callback error", zap.Error(err))
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
fmt.Println(fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
return
}
// TODO 跳转到前端页面
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
//service.Success(ctx, map[string]interface{}{
// "req": req,
// "resp": resp,

View File

@ -31,7 +31,6 @@ func UpdateWorkImage(ctx *gin.Context) {
ID: artistId,
Domain: "app",
})
zap.L().Info("UpdateWorkImage infoResp", zap.Any("infoResp", infoResp))
if err != nil {
service.Error(ctx, err)
return
@ -54,7 +53,6 @@ func UpdateWorkImage(ctx *gin.Context) {
newCtx := NewCtxWithUserInfo(ctx)
req.Source = 1
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
zap.L().Info("UpdateWorkImage resp", zap.Any("resp", resp))
if err != nil {
service.Error(ctx, err)
return
@ -77,7 +75,6 @@ func UpdateWorkVideo(ctx *gin.Context) {
ID: artistId,
Domain: "app",
})
zap.L().Info("UpdateWorkVideo", zap.Any("infoResp", infoResp))
if err != nil {
service.Error(ctx, err)
return
@ -100,7 +97,6 @@ func UpdateWorkVideo(ctx *gin.Context) {
newCtx := NewCtxWithUserInfo(ctx)
req.Source = 1
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
zap.L().Info("UpdateWorkVideo", zap.Any("resp", resp))
if err != nil {
service.Error(ctx, err)
return