by Robin at 20230102; fix imageaudit
This commit is contained in:
parent
da9b6b522b
commit
ce47257020
|
@ -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,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue