Skip to content

Commit

Permalink
Update user descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Jan 2, 2024
1 parent cb8d9bf commit 09a10e7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion API/auth/routers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ def my_data(user_data: AuthUser = Depends(login_required)):
Parameters:None
Returns: user_data
User Role :
ADMIN = 1
STAFF = 2
GUEST = 3
"""
return user_data

Expand All @@ -64,6 +68,10 @@ class User(BaseModel):
async def create_user(params: User, user_data: AuthUser = Depends(admin_required)):
"""
Creates a new user and returns the user's information.
User Role :
ADMIN = 1
STAFF = 2
GUEST = 3
Args:
- params (User): The user data including osm_id and role.
Expand All @@ -83,6 +91,10 @@ async def create_user(params: User, user_data: AuthUser = Depends(admin_required
async def read_user(osm_id: int, user_data: AuthUser = Depends(staff_required)):
"""
Retrieves user information based on the given osm_id.
User Role :
ADMIN = 1
STAFF = 2
GUEST = 3
Args:
- osm_id (int): The OSM ID of the user to retrieve.
Expand All @@ -105,7 +117,10 @@ async def update_user(
):
"""
Updates user information based on the given osm_id.
User Role :
ADMIN = 1
STAFF = 2
GUEST = 3
Args:
- osm_id (int): The OSM ID of the user to update.
- update_data (User): The data to update for the user.
Expand Down

0 comments on commit 09a10e7

Please sign in to comment.