2026-01-20 10:13:51 +08:00
|
|
|
'''
|
|
|
|
|
反应定义文件读取路由
|
|
|
|
|
'''
|
2026-01-05 09:30:43 +08:00
|
|
|
from flask import Blueprint
|
2026-01-20 08:45:50 +08:00
|
|
|
from ..utils import reactions
|
2026-01-05 09:30:43 +08:00
|
|
|
|
|
|
|
|
reaction_bp = Blueprint("reaction", __name__, "/reaction")
|
|
|
|
|
|
2026-01-21 16:37:36 +08:00
|
|
|
@reaction_bp.route("list")
|
|
|
|
|
def reaction_list():
|
|
|
|
|
return reactions.readReactionList()
|
|
|
|
|
|
|
|
|
|
@reaction_bp.route("/match")
|
|
|
|
|
def match_list():
|
|
|
|
|
return reactions.readMatchList()
|
|
|
|
|
|
2026-01-20 08:45:50 +08:00
|
|
|
@reaction_bp.route("/id/<id>")
|
2026-01-05 13:07:53 +08:00
|
|
|
def search_reaction(id):
|
2026-01-20 12:18:30 +08:00
|
|
|
return reactions.readReaction(id)
|
|
|
|
|
|
|
|
|
|
@reaction_bp.route("/match/<id>")
|
2026-01-21 16:37:36 +08:00
|
|
|
def select_reaction(id):
|
2026-01-20 12:18:30 +08:00
|
|
|
return reactions.selectReaction(id)
|