Remove unnecessary section id's from reading and listening to retrieve questions since context is already on the post dto

This commit is contained in:
Carlos-Mesquita
2024-11-12 14:19:52 +00:00
parent 12b3c45173
commit 6daab0d9a7
8 changed files with 13 additions and 15 deletions

View File

@@ -40,13 +40,12 @@ async def generate_passage(
return await reading_controller.generate_reading_passage(passage, topic, word_count)
@reading_router.post(
'/{passage}',
'/',
dependencies=[Depends(Authorized([IsAuthenticatedViaBearerToken]))]
)
@inject
async def generate_reading(
dto: ReadingDTO,
passage: int = Path(..., ge=1, le=3),
reading_controller: IReadingController = Depends(Provide[controller])
):
return await reading_controller.generate_reading_exercises(passage, dto)
return await reading_controller.generate_reading_exercises(dto)