add forget password

This commit is contained in:
aditya.siregar
2024-07-23 01:36:25 +07:00
parent 7ea809cc09
commit 5a0dec6128
22 changed files with 907 additions and 76 deletions
+3 -1
View File
@@ -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 {