ENCOA-254
This commit is contained in:
@@ -32,12 +32,12 @@ async def upload(
|
|||||||
async def generate_listening_dialog(
|
async def generate_listening_dialog(
|
||||||
section: int = Path(..., ge=1, le=4),
|
section: int = Path(..., ge=1, le=4),
|
||||||
difficulty: str = Query(default=None),
|
difficulty: str = Query(default=None),
|
||||||
topic: str = Query(default=None),
|
topic: str = Query(default=None),
|
||||||
listening_controller: IListeningController = Depends(Provide[controller])
|
listening_controller: IListeningController = Depends(Provide[controller])
|
||||||
):
|
):
|
||||||
difficulty = random.choice(EducationalContent.DIFFICULTIES) if not difficulty else difficulty
|
difficulty = random.choice(EducationalContent.DIFFICULTIES) if not difficulty else difficulty
|
||||||
topic = random.choice(EducationalContent.TOPICS) if not topic else topic
|
topic = random.choice(EducationalContent.TOPICS) if not topic else topic
|
||||||
return await listening_controller.generate_listening_dialog(section, difficulty, topic)
|
return await listening_controller.generate_listening_dialog(section, topic, difficulty)
|
||||||
|
|
||||||
@listening_router.post(
|
@listening_router.post(
|
||||||
'/media',
|
'/media',
|
||||||
|
|||||||
Reference in New Issue
Block a user