Following django async style-guide for user services
This commit is contained in:
parent
864a7741e6
commit
398a2c7c08
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@ from django.contrib.auth.models import User
|
|||
from typing import Optional
|
||||
|
||||
|
||||
async def create_user_information(user: User, *, display_name: Optional[str] = None) -> UserInformation:
|
||||
async def acreate_user_information(user: User, *, display_name: Optional[str] = None) -> UserInformation:
|
||||
"""Async. Create a UserInformation object for the given user.
|
||||
|
||||
@param user: The user to create the UserInformation object for.
|
||||
|
@ -20,7 +20,7 @@ async def create_user_information(user: User, *, display_name: Optional[str] = N
|
|||
return user_information
|
||||
|
||||
|
||||
async def get_user_information(user: User) -> UserInformation:
|
||||
async def aget_user_information(user: User) -> UserInformation:
|
||||
"""Async. Get the UserInformation object for the given user.
|
||||
|
||||
@param user: The user to get the UserInformation object for.
|
||||
|
@ -29,7 +29,7 @@ async def get_user_information(user: User) -> UserInformation:
|
|||
return await UserInformation.objects.aget(user)
|
||||
|
||||
|
||||
async def set_user_display_name(user: User, display_name: Optional[str] = None) -> UserInformation:
|
||||
async def aset_user_display_name(user: User, display_name: Optional[str] = None) -> UserInformation:
|
||||
"""Async. Set the display name for the given user.
|
||||
|
||||
@param user: The user to set the display name for.
|
||||
|
|
Loading…
Reference in a new issue