Files
xiaoxia-saas/packages/application/get_task_detail_use_case.py
T
Xiaoxia AI ef4cd8aedc
Deploy / Deploy Staging (push) Successful in 15s
Deploy / Deploy Production (push) Has been skipped
Tests / test (push) Failing after 2m3s
Tests / lint (push) Failing after 2m4s
feat: add GET task detail endpoint and use case
- GetTaskDetailUseCase for single task retrieval
- GET /api/v1/project-management/tasks/{task_id} endpoint
- Updated task detail page to use real API
- Added integration test for task detail retrieval
- Test passed: 1 new test green
2026-06-16 12:55:33 +08:00

17 lines
458 B
Python

"""获取单个任务详情用例"""
from packages.domain import Task
from packages.ports import TaskRepository
class GetTaskDetailUseCase:
"""获取任务详情用例"""
def __init__(self, task_repo: TaskRepository):
self.task_repo = task_repo
def execute(self, task_id: str) -> Task:
task = self.task_repo.get_by_id(task_id)
if not task:
raise ValueError(f"Task {task_id} not found")
return task