Skip to content

Commit

Permalink
Rename not_correct word for frontend
Browse files Browse the repository at this point in the history
Temporary removed get_game_sessions view
  • Loading branch information
MRossa157 committed Dec 4, 2024
1 parent a16be6c commit 7a1f02f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/wordle/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ class GameStatus(Enum):
class WordTypes(Enum):
CORRECT: str = 'GREEN'
WRONG_PLACE: str = 'YELLOW'
NOT_CORRECT: str = 'RED'
NOT_CORRECT: str = 'BLACK'
32 changes: 16 additions & 16 deletions src/wordle/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@ async def create_game_session(
return GameSessionResponse(session_id=session_id)


@router.get(
path='/game_sessions',
summary=(
'Получить список всех игровых сессий которые были у пользователя'
),
)
async def get_game_sessions(
token_payload: Annotated[
Dict[str, Any],
Depends(validate_access_token),
],
) -> GameSessionsResponse:
user = await get_current_active_auth_user(token_payload)
# @router.get(
# path='/game_sessions',
# summary=(
# 'Получить список всех игровых сессий которые были у пользователя'
# ),
# )
# async def get_game_sessions(
# token_payload: Annotated[
# Dict[str, Any],
# Depends(validate_access_token),
# ],
# ) -> GameSessionsResponse:
# user = await get_current_active_auth_user(token_payload)

return GameSessionsResponse(
user_sessions=await get_all_user_gamesessions(user.id),
)
# return GameSessionsResponse(
# user_sessions=await get_all_user_gamesessions(user.id),
# )


@router.post(
Expand Down

0 comments on commit 7a1f02f

Please sign in to comment.