Compare commits
No commits in common. "fd908ec72b192bf73dcf25cda291442a5bb51acc" and "b35278771e8cac75ea7fad08c48c823799ddb98e" have entirely different histories.
fd908ec72b
...
b35278771e
@ -214,16 +214,14 @@ func OAuth2Callback(ctx *gin.Context) {
|
|||||||
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
service.Error(ctx, errors.New(e.GetMsg(e.InvalidParams)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
zap.L().Info("OAuth2Callback", zap.Any("req", req), zap.Any("code", code), zap.Any("state", state))
|
|
||||||
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
_, err := service.CastProvider.OAuthCodeToToken(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
zap.L().Info("OAuth2Callback error", zap.Error(err))
|
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"))
|
||||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// TODO 跳转到前端页面
|
// 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{}{
|
//service.Success(ctx, map[string]interface{}{
|
||||||
// "req": req,
|
// "req": req,
|
||||||
// "resp": resp,
|
// "resp": resp,
|
||||||
|
|||||||
@ -31,7 +31,6 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
ID: artistId,
|
ID: artistId,
|
||||||
Domain: "app",
|
Domain: "app",
|
||||||
})
|
})
|
||||||
zap.L().Info("UpdateWorkImage infoResp", zap.Any("infoResp", infoResp))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -54,7 +53,6 @@ func UpdateWorkImage(ctx *gin.Context) {
|
|||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkImage(newCtx, req)
|
||||||
zap.L().Info("UpdateWorkImage resp", zap.Any("resp", resp))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -77,7 +75,6 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
ID: artistId,
|
ID: artistId,
|
||||||
Domain: "app",
|
Domain: "app",
|
||||||
})
|
})
|
||||||
zap.L().Info("UpdateWorkVideo", zap.Any("infoResp", infoResp))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
@ -100,7 +97,6 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
|||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
req.Source = 1
|
req.Source = 1
|
||||||
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
resp, err := service.CastProvider.UpdateWorkVideo(newCtx, req)
|
||||||
zap.L().Info("UpdateWorkVideo", zap.Any("resp", resp))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user