fix: remove Content-Type:application/json from interest POST
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
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 interest endpoint was returning 400 because fetch sent Content-Type:application/json with an empty body, causing Flask to fail JSON parsing. Removed the header since no JSON body is sent. Also reverted unnecessary CSRF blueprint exemption. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9efbc7959a
commit
cf2fce35be
@ -50,10 +50,8 @@ def register_blueprints(app):
|
||||
|
||||
try:
|
||||
from blueprints.community.classifieds import bp as classifieds_bp
|
||||
from extensions import csrf
|
||||
csrf.exempt(classifieds_bp)
|
||||
app.register_blueprint(classifieds_bp)
|
||||
logger.info("Registered blueprint: classifieds (with CSRF exemption)")
|
||||
logger.info("Registered blueprint: classifieds")
|
||||
except ImportError as e:
|
||||
logger.debug(f"Blueprint classifieds not yet available: {e}")
|
||||
|
||||
|
||||
@ -1028,7 +1028,6 @@ async function toggleInterest() {
|
||||
const response = await fetch('{{ url_for("classifieds.classifieds_interest", classified_id=classified.id) }}', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user