feat: 新增路由配置、通知和公告功能,并初始化相关服务和仓库。
This commit is contained in:
@@ -66,7 +66,6 @@ func (r *UserRepository) GetByEmail(email string) (*models.User, error) {
|
||||
return &user, nil
|
||||
}
|
||||
|
||||
|
||||
// Update updates a user in the database
|
||||
func (r *UserRepository) Update(user *models.User) error {
|
||||
return r.db.Save(user).Error
|
||||
@@ -163,3 +162,8 @@ func (r *UserRepository) EmailExists(email string) (bool, error) {
|
||||
}
|
||||
return count > 0, nil
|
||||
}
|
||||
|
||||
// DB returns the underlying gorm.DB instance
|
||||
func (r *UserRepository) DB() *gorm.DB {
|
||||
return r.db
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user