You've already forked RekomenciBackend
feat(): migrate to auth identity
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from typing import TYPE_CHECKING, override
|
||||
|
||||
from template_project.application.auth_identity.entity import AuthMethod
|
||||
from template_project.application.common.errors import ApplicationError, to_error
|
||||
|
||||
if TYPE_CHECKING:
|
||||
pass
|
||||
|
||||
|
||||
@to_error
|
||||
class UserAlreadyExistsError(ApplicationError):
|
||||
identifier: str
|
||||
auth_method: AuthMethod
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
return f"User with identifier={self.identifier!r} and auth method={self.auth_method.value} already exists"
|
||||
Reference in New Issue
Block a user