mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
26 lines
572 B
Go
26 lines
572 B
Go
package useCases
|
|
|
|
import (
|
|
"GohCMS2/adapters/secondary/gateways"
|
|
"GohCMS2/domain/user"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type UpdateUserUseCase struct {
|
|
userRepository gateways.UserRepository
|
|
}
|
|
|
|
type UpdateVerificationStatusCommand struct {
|
|
isVerified bool
|
|
}
|
|
|
|
func NewUpdateUserUseCase(db *gorm.DB) *UpdateUserUseCase {
|
|
return &UpdateUserUseCase{
|
|
userRepository: *gateways.NewUserRepository(db),
|
|
}
|
|
}
|
|
|
|
func (g *UpdateUserUseCase) UpdateVerificationStatus(userId uint32, isVerified bool) (user.User, error) {
|
|
return g.userRepository.UpdateVerificationStatus(userId, isVerified)
|
|
}
|