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)))
|
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 {
|
||||||
fmt.Println(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=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=1"))
|
ctx.Redirect(http.StatusFound, fmt.Sprintf("%s?%s", config.AppConfig.System.AuthRedirectUrl, "status=0"))
|
||||||
//service.Success(ctx, map[string]interface{}{
|
//service.Success(ctx, map[string]interface{}{
|
||||||
// "req": req,
|
// "req": req,
|
||||||
// "resp": resp,
|
// "resp": resp,
|
||||||
|
|||||||
@ -31,6 +31,7 @@ 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
|
||||||
@ -53,6 +54,7 @@ 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
|
||||||
@ -75,6 +77,7 @@ 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
|
||||||
@ -97,6 +100,7 @@ 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