django bacekdn opeartioanl fixes and site wp integration api fixes
This commit is contained in:
@@ -122,10 +122,10 @@ def wordpress_status_webhook(request):
|
||||
request=request
|
||||
)
|
||||
|
||||
# Verify API key matches integration
|
||||
stored_api_key = integration.credentials_json.get('api_key')
|
||||
# Verify API key matches Site.wp_api_key (SINGLE source of truth)
|
||||
stored_api_key = integration.site.wp_api_key
|
||||
if not stored_api_key or stored_api_key != api_key:
|
||||
logger.error(f"[wordpress_status_webhook] Invalid API key for integration {integration.id}")
|
||||
logger.error(f"[wordpress_status_webhook] Invalid API key for site {integration.site.id}")
|
||||
return error_response(
|
||||
error='Invalid API key',
|
||||
status_code=http_status.HTTP_401_UNAUTHORIZED,
|
||||
@@ -293,8 +293,8 @@ def wordpress_metadata_webhook(request):
|
||||
request=request
|
||||
)
|
||||
|
||||
# Verify API key
|
||||
stored_api_key = integration.credentials_json.get('api_key')
|
||||
# Verify API key against Site.wp_api_key (SINGLE source of truth)
|
||||
stored_api_key = integration.site.wp_api_key
|
||||
if not stored_api_key or stored_api_key != api_key:
|
||||
return error_response(
|
||||
error='Invalid API key',
|
||||
|
||||
Reference in New Issue
Block a user