Files
encoach_backend/app/controllers/impl/writing.py
Carlos Mesquita 3cf9fa5cba Async release
2024-07-23 08:40:35 +01:00

15 lines
506 B
Python

from app.controllers.abc import IWritingController
from app.services.abc import IWritingService
class WritingController(IWritingController):
def __init__(self, writing_service: IWritingService):
self._service = writing_service
async def get_writing_task_general_question(self, task: int, topic: str, difficulty: str):
try:
return await self._service.get_writing_task_general_question(task, topic, difficulty)
except Exception as e:
return str(e)