Remove trailing / from users endpoints
This commit is contained in:
parent
fd3e355bfc
commit
3689f7d076
|
@ -86,7 +86,7 @@ class UserUpdatable(BaseModel):
|
|||
return updated, user
|
||||
|
||||
|
||||
@public_router.post("/")
|
||||
@public_router.post("")
|
||||
async def register(reg_data: Annotated[RegisterData, Body()]) -> UserData:
|
||||
"""Register a new user."""
|
||||
user = await User.find_one(User.username == reg_data.username)
|
||||
|
@ -99,7 +99,7 @@ async def register(reg_data: Annotated[RegisterData, Body()]) -> UserData:
|
|||
return UserData.from_user(user)
|
||||
|
||||
|
||||
@protected_router.get("/")
|
||||
@protected_router.get("")
|
||||
async def get_users() -> list[UserData]:
|
||||
"""Get all registered users."""
|
||||
users = await User.find_all().to_list()
|
||||
|
|
Loading…
Reference in a new issue