feat: adding/removing users from list now works by email
This commit is contained in:
@@ -17,6 +17,7 @@ type User struct {
|
||||
|
||||
type UserRepository interface {
|
||||
CreateUser(ctx context.Context, email string, name string, passwordHash string) (*User, error)
|
||||
GetUserByEmail(ctx context.Context, email string) (*User, error)
|
||||
}
|
||||
|
||||
type UserService struct {
|
||||
@@ -45,3 +46,7 @@ func (s *UserService) CreateUser(ctx context.Context, email string, name string,
|
||||
|
||||
return s.repo.CreateUser(ctx, email, name, string(hash))
|
||||
}
|
||||
|
||||
func (s *UserService) GetUserByEmail(ctx context.Context, email string) (*User, error) {
|
||||
return s.repo.GetUserByEmail(ctx, email)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user