From 8722f368810da0fa3f023557c4b8427b40cde5a8 Mon Sep 17 00:00:00 2001 From: Idhibhat Pankam Date: Sun, 30 Jun 2024 23:46:46 +0700 Subject: [PATCH] fix: r.Db.First(stamp, "user_id = ?", userId).Error --- internal/stamp/stamp.repository.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/stamp/stamp.repository.go b/internal/stamp/stamp.repository.go index 4ee100c..228ea54 100644 --- a/internal/stamp/stamp.repository.go +++ b/internal/stamp/stamp.repository.go @@ -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 }