mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
refac: fixed, better, smarter, correct dependency injection
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
package useCases
|
||||
|
||||
import (
|
||||
"GoCMS/adapters/secondary/gateways"
|
||||
"GoCMS/domain/gateways"
|
||||
"GoCMS/domain/user"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type UpdateUserUseCase struct {
|
||||
userRepository gateways.UserRepository
|
||||
userRepository gateways.IUserRepository
|
||||
}
|
||||
|
||||
func NewUpdateUserUseCase(db *gorm.DB) *UpdateUserUseCase {
|
||||
return &UpdateUserUseCase{
|
||||
userRepository: *gateways.NewUserRepository(db),
|
||||
}
|
||||
func NewUpdateUserUseCase(userRepository gateways.IUserRepository) *UpdateUserUseCase {
|
||||
return &UpdateUserUseCase{userRepository}
|
||||
}
|
||||
|
||||
func (g *UpdateUserUseCase) UpdateVerificationStatus(userId uint32, isVerified bool) (user.User, error) {
|
||||
|
||||
Reference in New Issue
Block a user