comment creation logic

This commit is contained in:
Robert 2024-02-28 18:45:04 +07:00
parent 271461799d
commit 148ea1db10
No known key found for this signature in database
GPG Key ID: F631C7FD957D5F22

View File

@ -1,7 +1,7 @@
from .base import BaseProgressActionService
from chain_service.database.models.progress_chain import (
BaseProgressAction,
CommentProgressAction,
ProgressChain,
)
@ -14,10 +14,13 @@ class CommentProgressActionService(BaseProgressActionService):
self,
planfix_client: PlanfixClient,
progress_chain: ProgressChain,
progress_action: BaseProgressAction,
progress_action: CommentProgressAction,
):
self.planfix_client = planfix_client
super().__init__(progress_chain, progress_action)
self.progress_chain = progress_chain
self.progress_action = progress_action
async def process(self):
print("Comment service", self.progress_action, self.planfix_client)
await self.planfix_client.create_comment(
task_id=self.progress_chain.task_id, description=self.progress_action.text
)