Skip to content

Commit

Permalink
fix: r.Db.First(stamp, "user_id = ?", userId).Error
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jun 30, 2024
1 parent ce289f4 commit 8722f36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/stamp/stamp.repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func NewRepository(db *gorm.DB) Repository {
}

func (r *repositoryImpl) FindByUserId(userId string, stamp *model.Stamp) error {
return r.Db.First(stamp, "userId = ?", userId).Error
return r.Db.First(stamp, "user_id = ?", userId).Error
}

func (r *repositoryImpl) StampByUserId(userId string, stamp *model.Stamp) error {
return r.Db.Model(stamp).Where("userId = ?", userId).Updates(stamp).Error
return r.Db.Model(stamp).Where("user_id = ?", userId).Updates(stamp).Error
}

0 comments on commit 8722f36

Please sign in to comment.