Skip to content

Commit 00bef84

Browse files
authored
Merge pull request #37 from OriTsuruHime/develop
修复视频博主user获取错误Bug
2 parents 49a2f33 + 654e75a commit 00bef84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/video-center/service/videoService.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func (s *VideoService) FeedVideoList(lastTime int64, userId int64) ([]*pb.Video,
9090
isFav = false
9191
//如果登录了传入userId,否则传0表示没有登录
9292
for _, v := range list {
93-
if userId != 0 { //!=0表示已登录,查询是否是作者的粉丝s
93+
if userId != 0 { //!0表示已登录,查询是否是作者的粉丝s
9494
favorite, err := dao.IsFavorite(context.Background(), v.Id, userId) //查看是否点赞
9595
if err != nil {
9696
isFav = false
@@ -118,7 +118,7 @@ func (s *VideoService) FeedVideoList(lastTime int64, userId int64) ([]*pb.Video,
118118
videos = append(videos, &pb.Video{
119119
Id: v.Id,
120120
Author: &pb.User{
121-
Id: userId,
121+
Id: v.AuthorID,
122122
},
123123
PlayUrl: v.PlayUrl,
124124
CoverUrl: v.CoverUrl,

0 commit comments

Comments
 (0)