Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

fix: upload logic err #101

Merged
merged 5 commits into from
Aug 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmd/video/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,18 @@ func (s *VideoServiceImpl) PutVideo(ctx context.Context, req *video.PutVideoRequ
// 上传视频
eg.Go(func() error {
err = service.NewVideoService(ctx).UploadVideo(req, videoName)
return errno.FileUploadError
if err != nil {
return errno.FileUploadError
}
return nil
})
// 截取并上传封面
eg.Go(func() error {
err = service.NewVideoService(ctx).UploadCover(req, coverName)
return errno.FileUploadError
if err != nil {
return errno.FileUploadError
}
return nil
})
// 将视频数据写入数据库
eg.Go(func() error {
Expand Down
Loading