From e6584a712f497c0a92d849b02d3592121c5bb4f4 Mon Sep 17 00:00:00 2001 From: Tiger Date: Wed, 21 Jan 2026 16:37:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=88=97=E8=A1=A8=E7=9A=84=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/assets.py | 8 ++++++-- app/routes/cards.py | 4 ++++ app/routes/matters.py | 4 ++++ app/routes/reactions.py | 10 +++++++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/routes/assets.py b/app/routes/assets.py index 2f149e1..9255fde 100644 --- a/app/routes/assets.py +++ b/app/routes/assets.py @@ -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/") -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/") -def select_matter(id: str): +def find_sound(id: str): path = "../resources/assets/sounds/" + assets.readSoundPath(id) return send_file(path) \ No newline at end of file diff --git a/app/routes/cards.py b/app/routes/cards.py index 7f16766..fd92f42 100644 --- a/app/routes/cards.py +++ b/app/routes/cards.py @@ -6,6 +6,10 @@ from ..utils import cards card_bp = Blueprint("card", __name__, "/card") +@card_bp.route("/list") +def card_list(): + return cards.readCardList() + @card_bp.route("/id/") def search_card(id): return cards.readCard(id) \ No newline at end of file diff --git a/app/routes/matters.py b/app/routes/matters.py index 835a700..7d17378 100644 --- a/app/routes/matters.py +++ b/app/routes/matters.py @@ -6,6 +6,10 @@ from ..utils import matters matter_bp = Blueprint("matter", __name__, "/matter") +@matter_bp.route("/list") +def matter_list(): + return matters.readMatterList() + @matter_bp.route("/id/") def search_matter(id): return matters.readMatter(id) \ No newline at end of file diff --git a/app/routes/reactions.py b/app/routes/reactions.py index a0fbdeb..aa5ab5d 100644 --- a/app/routes/reactions.py +++ b/app/routes/reactions.py @@ -6,10 +6,18 @@ from ..utils import reactions reaction_bp = Blueprint("reaction", __name__, "/reaction") +@reaction_bp.route("list") +def reaction_list(): + return reactions.readReactionList() + +@reaction_bp.route("/match") +def match_list(): + return reactions.readMatchList() + @reaction_bp.route("/id/") def search_reaction(id): return reactions.readReaction(id) @reaction_bp.route("/match/") -def select_matter(id): +def select_reaction(id): return reactions.selectReaction(id) \ No newline at end of file