From 905606169a36f41f53e16f47c3a62d180bd96f2e Mon Sep 17 00:00:00 2001 From: psyray Date: Mon, 16 Sep 2024 23:22:59 +0200 Subject: [PATCH] fix: update content type in tests and error messages and correct HTML placeholder - Updated test cases to include content_type='application/json' in POST requests. - Modified error messages in AddReconNote view to remove checks for scan_history_id and subdomain_id. - Corrected the placeholder text in the HTML input field for adding a to-do. --- web/api/views.py | 4 ---- web/recon_note/templates/note/index.html | 2 +- web/recon_note/tests/test_recon_note.py | 12 ++++++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/web/api/views.py b/web/api/views.py index 13c0e705..3eea62e9 100644 --- a/web/api/views.py +++ b/web/api/views.py @@ -650,10 +650,6 @@ def post(self, request): if not title: return Response({"status": False, "error": "Title is required."}, status=400) - if scan_history_id is None: - return Response({"status": False, "error": "Scan history is required."}, status=400) - if subdomain_id is None: - return Response({"status": False, "error": "Subdomain is required."}, status=400) if not project: return Response({"status": False, "error": "Project is required."}, status=400) diff --git a/web/recon_note/templates/note/index.html b/web/recon_note/templates/note/index.html index c86b61ae..92afc6ea 100644 --- a/web/recon_note/templates/note/index.html +++ b/web/recon_note/templates/note/index.html @@ -89,7 +89,7 @@
Add to-do
- +