fix6
This commit is contained in:
@@ -213,8 +213,11 @@ def handle_meeting_detail(meeting_id):
|
||||
return jsonify(meeting.to_dict())
|
||||
|
||||
if request.method == 'DELETE':
|
||||
if get_jwt().get('role') != 'admin':
|
||||
return jsonify({"msg": "Administration rights required"}), 403
|
||||
current_user_id = get_jwt_identity()
|
||||
is_admin = get_jwt().get('role') == 'admin'
|
||||
|
||||
if not is_admin and str(meeting.created_by_id) != str(current_user_id):
|
||||
return jsonify({"msg": "Only the meeting creator or an admin can delete this meeting."}), 403
|
||||
db.session.delete(meeting)
|
||||
db.session.commit()
|
||||
return jsonify({"msg": "Meeting and associated action items deleted"}), 200
|
||||
@@ -235,9 +238,9 @@ def summarize_meeting(meeting_id):
|
||||
@jwt_required()
|
||||
def preview_actions(meeting_id):
|
||||
meeting = Meeting.query.get_or_404(meeting_id)
|
||||
text_content = meeting.summary or meeting.transcript
|
||||
text_content = meeting.transcript # Always use the full transcript
|
||||
if not text_content:
|
||||
return jsonify({'error': 'Meeting has no summary or transcript to analyze.'}), 400
|
||||
return jsonify({'error': 'Meeting has no transcript to analyze.'}), 400
|
||||
|
||||
task = preview_action_items_task.delay(text_content)
|
||||
return jsonify({'task_id': task.id, 'status_url': f'/status/{task.id}'}), 202
|
||||
|
Reference in New Issue
Block a user