This commit is contained in:
2025-12-22 14:47:25 -05:00
parent d4e859f9a7
commit 00e9eb8986
81 changed files with 13933 additions and 0 deletions

20
backend/routes/teams.py Normal file
View File

@@ -0,0 +1,20 @@
from flask import Blueprint, jsonify
from backend.models import db, Team
bp = Blueprint('teams', __name__, url_prefix='/api/teams')
@bp.route('/<int:team_id>', methods=['DELETE'])
def delete_team(team_id):
"""Delete a team"""
team = Team.query.get_or_404(team_id)
try:
db.session.delete(team)
db.session.commit()
return jsonify({'message': 'Team deleted successfully'}), 200
except Exception as e:
db.session.rollback()
return jsonify({'error': str(e)}), 500