mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
27 lines
788 B
Go
27 lines
788 B
Go
package useCases
|
|
|
|
import (
|
|
"GoCMS/domain/gateways"
|
|
"GoCMS/domain/user"
|
|
)
|
|
|
|
type UpdateUserUseCase struct {
|
|
userRepository gateways.IUserRepository
|
|
}
|
|
|
|
func NewUpdateUserUseCase(userRepository gateways.IUserRepository) *UpdateUserUseCase {
|
|
return &UpdateUserUseCase{userRepository}
|
|
}
|
|
|
|
func (g *UpdateUserUseCase) UpdateVerificationStatus(userId uint32, isVerified bool) (user.User, error) {
|
|
return g.userRepository.UpdateVerificationStatus(userId, isVerified)
|
|
}
|
|
|
|
func (g *UpdateUserUseCase) UpdatePasswordResetCode(userId uint32, code string) (user.User, error) {
|
|
return g.userRepository.UpdatePasswordResetCode(userId, code)
|
|
}
|
|
|
|
func (g *UpdateUserUseCase) UpdatePassword(userId uint32, password string) (user.User, error) {
|
|
return g.userRepository.UpdatePassword(userId, password)
|
|
}
|