Files
evening_detective_server/internal/services/users_service/service.go
T
2026-06-29 02:11:28 +07:00

32 lines
520 B
Go

package users_service
import (
"context"
"evening_detective_server/internal/repos/users_repo"
)
type UsersService struct {
usersRepo *users_repo.UsersRepo
}
func NewUsersService(usersRepo *users_repo.UsersRepo) *UsersService {
return &UsersService{
usersRepo: usersRepo,
}
}
func (s *UsersService) AddUser(
ctx context.Context,
username string,
email string,
) error {
err := s.usersRepo.AddUser(
ctx,
username,
email,
"hello", // TODO: generate password and send email
"user",
)
return err
}