diff --git a/app/mix/service/imageauditservice.go b/app/mix/service/imageauditservice.go index b075e41c..b1fd30a9 100644 --- a/app/mix/service/imageauditservice.go +++ b/app/mix/service/imageauditservice.go @@ -63,27 +63,6 @@ func (s *Service) CreateUpdateStreamerImageAudit(ctx *gin.Context, oldStreamer * }, rollBackFunc)) } - // if newStreamer.Shorts != nil { - // rollBackFunc := func() error { - // return _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{ - // Streamer: &dbstruct.Streamer{ - // Uid: oldStreamer.Uid, - // Shorts: oldStreamer.Shorts, - // }, - // }) - // } - - // tasks = append(tasks, imageaudit.NewImageAuditTaskControlBlock(&dbstruct.ImageAuditTask{ - // RouteUrl: goproto.String(ctx.Request.URL.Path), - // AssociativeDatabase: goproto.String("streamer"), - // AssociativeTableName: goproto.String("streamer"), - // AssociativeTableId: oldStreamer.Id, - // AssociativeTableColumn: goproto.String("shorts"), - // AuditedMedia: newStreamer.Shorts, - // OldMedia: oldStreamer.Shorts, - // }, rollBackFunc)) - // } - if newStreamer.Album != nil { rollBackFunc := func() error { return _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{ @@ -138,7 +117,7 @@ func (s *Service) GetAccountUpdateImageFunc(ctx *gin.Context, column string, med func (s *Service) GetStreamerUpdateImageFunc(ctx *gin.Context, column string, media *dbstruct.MediaComponent, id *int64) func() error { switch column { - case "avatar": + case "cover": return func() error { return _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{ Streamer: &dbstruct.Streamer{ @@ -147,21 +126,12 @@ func (s *Service) GetStreamerUpdateImageFunc(ctx *gin.Context, column string, me }, }) } - // case "shorts": - // return func() error { - // return _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{ - // Streamer: &dbstruct.Streamer{ - // Uid: id, - // Shorts: media, - // }, - // }) - // } case "album": return func() error { return _DefaultStreamer.OpUpdate(ctx, &streamerproto.OpUpdateReq{ Streamer: &dbstruct.Streamer{ Mid: id, - Cover: media, + Album: media, }, }) }