Batch import wasn't updated
This commit is contained in:
@@ -6,7 +6,7 @@ from fastapi import APIRouter, Depends, Path, Query
|
||||
from app.middlewares import Authorized, IsAuthenticatedViaBearerToken
|
||||
from app.controllers.abc import IListeningController
|
||||
from app.configs.constants import EducationalContent, ListeningExerciseType
|
||||
from app.dtos.listening import SaveListeningDTO, GenerateListeningExercises
|
||||
from app.dtos.listening import SaveListeningDTO, GenerateListeningExercises, Dialog
|
||||
|
||||
controller = "listening_controller"
|
||||
listening_router = APIRouter()
|
||||
@@ -26,6 +26,18 @@ async def generate_listening_dialog(
|
||||
topic = random.choice(EducationalContent.TOPICS) if not topic else topic
|
||||
return await listening_controller.generate_listening_dialog(section, difficulty, topic)
|
||||
|
||||
@listening_router.post(
|
||||
'/media',
|
||||
dependencies=[Depends(Authorized([IsAuthenticatedViaBearerToken]))]
|
||||
)
|
||||
@inject
|
||||
async def generate_mp3(
|
||||
dto: Dialog,
|
||||
listening_controller: IListeningController = Depends(Provide[controller])
|
||||
):
|
||||
return await listening_controller.generate_mp3(dto)
|
||||
|
||||
|
||||
@listening_router.post(
|
||||
'/{section}',
|
||||
dependencies=[Depends(Authorized([IsAuthenticatedViaBearerToken]))]
|
||||
|
||||
Reference in New Issue
Block a user