Add admin password reset functionality for users and customers
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"time"
|
||||
|
||||
"tm/internal/company"
|
||||
"tm/pkg/audit"
|
||||
"tm/pkg/logger"
|
||||
"tm/pkg/notification"
|
||||
"tm/pkg/redis"
|
||||
@@ -35,6 +36,7 @@ type Service interface {
|
||||
Update(ctx context.Context, id string, form *UpdateCustomerForm) (*CustomerResponse, error)
|
||||
Delete(ctx context.Context, id string) error
|
||||
UpdateStatus(ctx context.Context, id string, form *UpdateStatusForm) error
|
||||
AdminResetPassword(ctx context.Context, actorID, targetID string) (*AdminResetPasswordResponse, error)
|
||||
|
||||
// Authentication operations
|
||||
Login(ctx context.Context, form *LoginForm) (*AuthResponse, error)
|
||||
@@ -62,10 +64,11 @@ type customerService struct {
|
||||
redisClient redis.Client
|
||||
notification notification.SDK
|
||||
validator ValidationService
|
||||
auditLogger audit.Logger
|
||||
}
|
||||
|
||||
// New creates a new customer service
|
||||
func NewService(repository Repository, logger logger.Logger, authService authorization.AuthorizationService, companyService company.Service, redisClient redis.Client, notificationSDK notification.SDK, validator ValidationService) Service {
|
||||
func NewService(repository Repository, logger logger.Logger, authService authorization.AuthorizationService, companyService company.Service, redisClient redis.Client, notificationSDK notification.SDK, validator ValidationService, auditLogger audit.Logger) Service {
|
||||
return &customerService{
|
||||
repository: repository,
|
||||
logger: logger,
|
||||
@@ -74,6 +77,7 @@ func NewService(repository Repository, logger logger.Logger, authService authori
|
||||
redisClient: redisClient,
|
||||
notification: notificationSDK,
|
||||
validator: validator,
|
||||
auditLogger: auditLogger,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user