Async release
This commit is contained in:
14
app/controllers/impl/writing.py
Normal file
14
app/controllers/impl/writing.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user