diff --git a/back/main.py b/back/main.py index 28e3cd7..7cf9dae 100644 --- a/back/main.py +++ b/back/main.py @@ -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)] ): @@ -253,4 +253,4 @@ def dispose(data: schemas.TrashboxResponse, current_user: Annotated[schemas.User database.add(new_trashox) database.commit() database.refresh(new_trashox) # обновляем состояние объекта - \ No newline at end of file + diff --git a/back/schemas.py b/back/schemas.py index 440e35e..d624703 100644 --- a/back/schemas.py +++ b/back/schemas.py @@ -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] = [] @@ -102,4 +100,4 @@ class SortAnnouncements(BaseModel): # схема для начисления баллов class AddRating(BaseModel): user_id: int - rate: int \ No newline at end of file + rate: int