Fixed url paths and made reg_date working well on back
This commit is contained in:
parent
835dcf3979
commit
6c5c7aa0c2
@ -162,12 +162,12 @@ async def login_for_access_token(
|
||||
return {"access_token":access_token}
|
||||
|
||||
|
||||
@app.get("/api/users/me/", response_model=schemas.User) #
|
||||
@app.get("/api/users/me", response_model=schemas.User) #
|
||||
async def read_users_me(current_user: Annotated[schemas.User, Depends(utils.get_current_active_user)]):
|
||||
return current_user
|
||||
|
||||
|
||||
@app.get("/api/users/me/items/")
|
||||
@app.get("/api/users/me/items")
|
||||
async def read_own_items(
|
||||
current_user: Annotated[schemas.User, Depends(utils.get_current_active_user)]
|
||||
):
|
||||
|
@ -58,8 +58,6 @@ class TokenData(BaseModel):
|
||||
class User(BaseModel):
|
||||
id: int
|
||||
nickname: str
|
||||
name: Union[str, None] = None
|
||||
surname: Union[str, None] = None
|
||||
reg_date: date
|
||||
disabled: Union[bool, None] = False
|
||||
items: list[Announcement] = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user