mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
Added docs
This commit is contained in:
parent
9066116b7e
commit
39b035a123
@ -51,6 +51,13 @@ def email_validator():
|
|||||||
|
|
||||||
|
|
||||||
def create_contact(user: User, alias: Alias, contact_address: str) -> Contact:
|
def create_contact(user: User, alias: Alias, contact_address: str) -> Contact:
|
||||||
|
"""
|
||||||
|
Create a contact for a user. Can be restricted for new free users by enabling DISABLE_CREATE_CONTACTS_FOR_FREE_USERS.
|
||||||
|
Can throw exceptions:
|
||||||
|
- ErrAddressInvalid
|
||||||
|
- ErrContactAlreadyExists
|
||||||
|
- ErrContactUpgradeNeeded - If DISABLE_CREATE_CONTACTS_FOR_FREE_USERS this exception will be raised for new free users
|
||||||
|
"""
|
||||||
if not contact_address:
|
if not contact_address:
|
||||||
raise ErrAddressInvalid("Empty address")
|
raise ErrAddressInvalid("Empty address")
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user