mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
feat: email verification flow (not 100% complete)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user