feat: 添加了读取列表的路由

This commit is contained in:
2026-01-21 16:37:36 +08:00
parent 86202b853d
commit e6584a712f
4 changed files with 23 additions and 3 deletions
+6 -2
View File
@@ -6,12 +6,16 @@ from ..utils import assets
asset_bp = Blueprint("asset", __name__, "/asset")
@asset_bp.route("/list")
def asset_list():
return assets.readAssetsList()
@asset_bp.route("/pic/<id>")
def search_matter(id: str):
def find_pic(id: str):
path = "../resources/assets/pics/" + assets.readPicPath(id)
return send_file(path)
@asset_bp.route("/sound/<id>")
def select_matter(id: str):
def find_sound(id: str):
path = "../resources/assets/sounds/" + assets.readSoundPath(id)
return send_file(path)