Files
backend/app/routes/matters.py
T

15 lines
355 B
Python
Raw Normal View History

2026-01-20 10:13:51 +08:00
'''
物质定义文件读取路由
'''
from flask import Blueprint, jsonify
2026-01-20 08:45:50 +08:00
from ..utils import matters
2026-02-12 17:15:03 +08:00
matter_bp = Blueprint("matter", __name__, url_prefix="/matter")
2026-01-21 16:37:36 +08:00
@matter_bp.route("/list")
def matter_list():
return jsonify(matters.readMatterList())
2026-01-21 16:37:36 +08:00
2026-01-20 08:45:50 +08:00
@matter_bp.route("/id/<id>")
def search_matter(id):
return jsonify(matters.readMatter(id))