remove broken subroutine from app.py

This commit is contained in:
2025-11-07 09:45:43 -08:00
parent 888d20f6d6
commit ee610e334b
-19
View File
@@ -7,25 +7,6 @@ app = Flask(__name__)
with open('{{ gpo_yaml_path }}', 'r') as file:
data = yaml.safe_load(file)
# Debugging output to check the structure of loaded data
# print("Loaded YAML data:", data)
@app.route('/gpos', methods=['GET'])
def get_gpos():
group_name = request.args.get('group_name')
if not group_name:
return jsonify({"error": "Group name is required"}), 400
gpos = []
for gpo, links in data['configured_gpos'].items():
for link in links:
if link['ad_group'] == group_name or link['local_group'] == group_name:
gpos.append(gpo)
break
return jsonify({"group_name": group_name, "GPOs": gpos})
@app.route('/gpo', methods=['GET'])
def get_groups():
group_name = request.args.get('group')