feat:
This commit is contained in:
@@ -36,14 +36,21 @@ def refresh_task(task_id):
|
||||
|
||||
|
||||
class CalculateQuery(BaseModel):
|
||||
year: str = Field(title='年份')
|
||||
month: str = Field(title='月份')
|
||||
year: int = Field(title='年份')
|
||||
month: int = Field(title='月份')
|
||||
|
||||
|
||||
@data.route('/calculate', methods=['GET'])
|
||||
@siwa.doc(tags=[""], summary='触发计算任务', query=CalculateQuery)
|
||||
def start_calculate(query: CalculateQuery):
|
||||
calculate(year=query.year, month=query.month)
|
||||
|
||||
return Response()
|
||||
|
||||
|
||||
@data.route('/collect', methods=['GET'])
|
||||
@siwa.doc(tags=[""], summary='触发计算任务', query=CalculateQuery)
|
||||
def start_collect(query: CalculateQuery):
|
||||
collect(year=query.year, month=query.month)
|
||||
|
||||
return Response()
|
||||
|
Reference in New Issue
Block a user