feat: 添加了读取列表的路由
This commit is contained in:
@@ -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)
|
||||
@@ -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/<id>")
|
||||
def search_card(id):
|
||||
return cards.readCard(id)
|
||||
@@ -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/<id>")
|
||||
def search_matter(id):
|
||||
return matters.readMatter(id)
|
||||
@@ -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/<id>")
|
||||
def search_reaction(id):
|
||||
return reactions.readReaction(id)
|
||||
|
||||
@reaction_bp.route("/match/<id>")
|
||||
def select_matter(id):
|
||||
def select_reaction(id):
|
||||
return reactions.selectReaction(id)
|
||||
Reference in New Issue
Block a user