- 移除 services/__init__.py 中的所有服务导入导出 - 将各个蓝图中的通配符导入改为具体服务模块导入 - 将 files_rename 函数重命名为 file_rename 并更新相关引用 - 更新前端 API 调用中的函数名映射 - 修复视频蓝图中的多余空行问题 - 移除种子蓝图中的未使用路由代码
18 lines
405 B
Python
18 lines
405 B
Python
from typing import List
|
|
from flask import Blueprint, jsonify
|
|
|
|
from app.services.file_service import FileService
|
|
|
|
bp = Blueprint("file", __name__)
|
|
|
|
|
|
@bp.route('/rename')
|
|
def file_rename():
|
|
paths: List[str] = [
|
|
"C:\\迅雷下载\\0_done",
|
|
"C:\\Users\\Localhost\\Desktop\\BT",
|
|
]
|
|
|
|
file_object = FileService(paths)
|
|
return jsonify({"code": 200, "message": file_object.rename()})
|