fix(audit): Pass previous analysis data through API response
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

The API route was explicitly mapping fields and omitting the 'previous'
key from the service result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-07 18:09:06 +01:00
parent 7197af3933
commit 706dcfd680

View File

@ -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'])