Skip to content

Commit

Permalink
fix: ReviewVote where
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Apr 8, 2024
1 parent bca0132 commit d5ff0b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion danke/api/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func VoteForReviewV1(c *fiber.Ctx) (err error) {
err = DB.Transaction(func(tx *gorm.DB) (err error) {
// 获取用户投票
var vote ReviewVote
err = tx.Where("review_id = ? AND voter_id = ?", reviewID, user.ID).First(&vote).Error
err = tx.Where("review_id = ? AND user_id = ?", reviewID, user.ID).First(&vote).Error
if err != nil {
if !errors.Is(err, gorm.ErrRecordNotFound) {
return
Expand Down

0 comments on commit d5ff0b8

Please sign in to comment.