init
This commit is contained in:
9
app/domain/users/services.py
Normal file
9
app/domain/users/services.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from app.domain.users.entities import User
|
||||
from app.domain.users.exceptions import UserAlreadyExists
|
||||
|
||||
|
||||
def ensure_unique_email(*, existing_user: User | None) -> None:
|
||||
if existing_user is not None:
|
||||
raise UserAlreadyExists("User with this email already exists.")
|
||||
Reference in New Issue
Block a user