整理代码
This commit is contained in:
@@ -101,10 +101,7 @@ class ContractApiHandler(BaseApiHandler):
|
||||
"""合同 API Handler"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._node_type = "contract"
|
||||
self._node_class = ContractSyncNode
|
||||
self._schema = ContractResponse
|
||||
super().__init__(node_class=ContractSyncNode, schema=ContractResponse)
|
||||
self.update_schemas = [ContractCreate, ContractUpdate]
|
||||
|
||||
# ========== Handler 接口实现 ==========
|
||||
|
||||
@@ -9,6 +9,6 @@ from schemas.contract.contract import ContractResponse
|
||||
class ContractJsonlHandler(BaseJsonlHandler):
|
||||
"""合同 JSONL Handler"""
|
||||
def __init__(self, datasource: JsonlDataSource):
|
||||
super().__init__(datasource, "contract", ContractSyncNode, ContractResponse)
|
||||
super().__init__(datasource, ContractSyncNode, schema=ContractResponse)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user