add forget password
This commit is contained in:
@@ -35,7 +35,7 @@ type ServiceManagerImpl struct {
|
||||
|
||||
func NewServiceManagerImpl(cfg *config.Config, repo *repository.RepoManagerImpl) *ServiceManagerImpl {
|
||||
return &ServiceManagerImpl{
|
||||
AuthSvc: auth.New(repo.Auth, repo.Crypto),
|
||||
AuthSvc: auth.New(repo.Auth, repo.Crypto, repo.User, repo.EmailService, cfg.Email, repo.Trx),
|
||||
EventSvc: event.NewEventService(repo.Event),
|
||||
UserSvc: users.NewUserService(repo.User, repo.Branch),
|
||||
BranchSvc: branch.NewBranchService(repo.Branch),
|
||||
@@ -52,6 +52,8 @@ func NewServiceManagerImpl(cfg *config.Config, repo *repository.RepoManagerImpl)
|
||||
|
||||
type Auth interface {
|
||||
AuthenticateUser(ctx context.Context, email, password string) (*entity.AuthenticateUser, error)
|
||||
SendPasswordResetLink(ctx context.Context, email string) error
|
||||
ResetPassword(ctx mycontext.Context, oldPassword, newPassword string) error
|
||||
}
|
||||
|
||||
type Event interface {
|
||||
|
||||
Reference in New Issue
Block a user