File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1010router = APIRouter (prefix = "/auth" , tags = ["auth" ])
1111security = HTTPBearer ()
1212
13- #TODO: ADD RATE LIMITING
13+
14+ # TODO: ADD RATE LIMITING
1415@router .post ("/register" , response_model = UserCreateResponse )
1516async def register_user (
1617 user : UserCreateRequest , user_service : UserService = Depends (get_user_service )
@@ -22,6 +23,7 @@ async def register_user(
2223 except Exception as e :
2324 raise HTTPException (status_code = 500 , detail = str (e ))
2425
26+
2527@router .post ("/login" , response_model = AuthResponse )
2628async def login (
2729 credentials : LoginRequest , auth_service : AuthService = Depends (get_auth_service )
Original file line number Diff line number Diff line change 1414# send email verification via auth_service
1515# allow signup methods other than email (like sign up w Google)??
1616
17- #admin only manually create user, not sure if this is needed
17+
18+ # admin only manually create user, not sure if this is needed
1819@router .post ("/" , response_model = UserCreateResponse )
1920async def create_user (
2021 user : UserCreateRequest ,
2122 user_service : UserService = Depends (get_user_service ),
22- authorized : bool = has_roles ([UserRole .ADMIN ])
23+ authorized : bool = has_roles ([UserRole .ADMIN ]),
2324):
2425 try :
2526 return await user_service .create_user (user )
You can’t perform that action at this time.
0 commit comments