oops
This commit is contained in:
@@ -302,3 +302,25 @@ def seek_audio(game_id):
|
||||
return jsonify({'message': f'Audio seeked to {position}s'}), 200
|
||||
except Exception as e:
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
|
||||
@bp.route('/game/<int:game_id>/advance-turn', methods=['POST'])
|
||||
@require_auth
|
||||
def advance_turn(game_id):
|
||||
"""Advance to the next team's turn"""
|
||||
game = Game.query.get_or_404(game_id)
|
||||
|
||||
try:
|
||||
next_team = game_service.advance_turn(game, socketio)
|
||||
if next_team:
|
||||
return jsonify({
|
||||
'message': 'Turn advanced',
|
||||
'current_turn_team_id': next_team.id,
|
||||
'current_turn_team_name': next_team.name
|
||||
}), 200
|
||||
else:
|
||||
return jsonify({'error': 'No teams in game'}), 400
|
||||
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
Reference in New Issue
Block a user