feat: 实现资源(图片、音频)查询,完善README

This commit is contained in:
2026-01-20 09:34:24 +08:00
parent 70574c8a77
commit 9dce8988b3
10 changed files with 107 additions and 12 deletions
+14
View File
@@ -0,0 +1,14 @@
from flask import Blueprint, send_file
from ..utils import assets
asset_bp = Blueprint("asset", __name__, "/asset")
@asset_bp.route("/pic/<id>")
def search_matter(id: str):
path = "../resources/assets/pics/" + assets.readPicPath(id)
return send_file(path)
@asset_bp.route("/sound/<id>")
def select_matter(id: str):
path = "../resources/assets/sounds/" + assets.readSoundPath(id)
return send_file(path)