15 lines
506 B
Python
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)
|