Compare commits
3 Commits
b35278771e
...
fd908ec72b
| Author | SHA1 | Date | |
|---|---|---|---|
| fd908ec72b | |||
| 97f79df433 | |||
| e037f91507 |
@ -214,14 +214,16 @@ 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 {
|
||||
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"))
|
||||
zap.L().Info("OAuth2Callback error", zap.Error(err))
|
||||
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
||||
return
|
||||
}
|
||||
// TODO 跳转到前端页面
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=1"))
|
||||
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||
//service.Success(ctx, map[string]interface{}{
|
||||
// "req": req,
|
||||
// "resp": resp,
|
||||
|
||||
@ -31,6 +31,7 @@ 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
|
||||
@ -53,6 +54,7 @@ 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
|
||||
@ -75,6 +77,7 @@ 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
|
||||
@ -97,6 +100,7 @@ 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user