fix: 添加获取用户信息的GET API路由

This commit is contained in:
2026-04-28 13:09:13 +08:00
parent 336e3cd12f
commit 60db170c0d

View File

@@ -501,8 +501,9 @@ def get_users():
@app.route('/api/admin/users/<int:id>', methods=['GET'])
@app.route('/api/user/<int:id>', methods=['GET'])
def get_user(id):
"""获取单个用户"""
"""获取单个用户信息"""
conn = get_db()
cursor = conn.cursor()
cursor.execute('SELECT * FROM users WHERE id = ?', (id,))