整理代码
This commit is contained in:
@@ -10,7 +10,7 @@ PUT:
|
||||
- /preparation - 更新里程碑数据
|
||||
"""
|
||||
|
||||
from typing import List, Dict, Any
|
||||
from typing import List, Dict
|
||||
from ...datasource.api.handler import BaseApiHandler
|
||||
from ...datasource.task_result import TaskResult
|
||||
from ...common.sync_node import SyncNode
|
||||
@@ -23,10 +23,7 @@ class PreparationApiHandler(BaseApiHandler):
|
||||
"""里程碑 API Handler"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._node_type = "preparation"
|
||||
self._node_class = PreparationSyncNode
|
||||
self._schema = PreparationDetail
|
||||
super().__init__(node_class=PreparationSyncNode, schema=PreparationDetail)
|
||||
self.update_schemas = [PostPreparation]
|
||||
|
||||
async def load(self) -> List[SyncNode]:
|
||||
@@ -141,10 +138,6 @@ class PreparationApiHandler(BaseApiHandler):
|
||||
for node in nodes
|
||||
]
|
||||
|
||||
def _create_node(self, data: Dict[str, Any]) -> SyncNode:
|
||||
return self._create_basic_node(data, depend_ids=[])
|
||||
|
||||
|
||||
# ========== 静态 API 函数 ==========
|
||||
|
||||
async def api_update_preparation(
|
||||
|
||||
Reference in New Issue
Block a user