Skip to content

Commit

Permalink
Merge pull request #107 from Attack825/dev
Browse files Browse the repository at this point in the history
fix CountVideo  #106
  • Loading branch information
liaosunny123 authored Aug 22, 2023
2 parents 3990eff + 4204cff commit 166a7bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/publish/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (a PublishServiceImpl) CountVideo(ctx context.Context, req *publish.CountVi
logger := logging.LogService("PublishServiceImpl.CountVideo").WithContext(ctx)

var count int64
err = database.Client.WithContext(ctx).Where("user_id = ?", req.UserId).Count(&count).Error
err = database.Client.WithContext(ctx).Model(&models.Video{}).Where("user_id = ?", req.UserId).Count(&count).Error
if err != nil {
logger.WithFields(logrus.Fields{
"err": err,
Expand Down

0 comments on commit 166a7bb

Please sign in to comment.