diff --git a/blueprints/api/routes_audit_actions.py b/blueprints/api/routes_audit_actions.py index c32add3..e94ae3a 100644 --- a/blueprints/api/routes_audit_actions.py +++ b/blueprints/api/routes_audit_actions.py @@ -60,13 +60,16 @@ def api_audit_analyze(): if 'error' in result: return jsonify({'success': False, 'error': result['error']}), 422 - return jsonify({ + response = { 'success': True, 'summary': result.get('summary', ''), 'actions': result.get('actions', []), 'cached': result.get('cached', False), 'generated_at': result.get('generated_at'), - }) + } + if 'previous' in result: + response['previous'] = result['previous'] + return jsonify(response) @bp.route('/audit/generate-content', methods=['POST'])